Skip to content

Refine detection idiom and type traits#102

Merged
renatoGarcia merged 1 commit into
masterfrom
refactor/detection-idiom-improvements
Apr 22, 2026
Merged

Refine detection idiom and type traits#102
renatoGarcia merged 1 commit into
masterfrom
refactor/detection-idiom-improvements

Conversation

@renatoGarcia
Copy link
Copy Markdown
Owner

  • Add nonesuch sentinel type; use it as default in detected_or instead of void, making "not detected" cases unambiguous
  • Rename returned_type -> invoke_result, resolve_view_t -> pipe_result to follow STL naming conventions
  • Make get_iterator_t and get_reference_t safe via detected_or instead of hard decltype aliases, preventing hard errors in SFINAE contexts when T is not a range/iterator
  • Replace is_input_iterator_expr void_t pattern with is_detected_exact checks enforcing that pre-increment returns T& and post-increment returns T
  • Replace bidirectional_iterator_extra_expr with is_detected_exact checks for pre/post decrement return types
  • Add is_detected_exact comment and normalize its template formatting
  • Strengthen is_sentinel_for to also require I satisfies is_input_iterator

- Add nonesuch sentinel type; use it as default in detected_or instead
  of void, making "not detected" cases unambiguous
- Rename returned_type -> invoke_result, resolve_view_t -> pipe_result
  to follow STL naming conventions
- Make get_iterator_t and get_reference_t safe via detected_or<nonesuch>
  instead of hard decltype aliases, preventing hard errors in SFINAE
  contexts when T is not a range/iterator
- Replace is_input_iterator_expr void_t pattern with is_detected_exact
  checks enforcing that pre-increment returns T& and post-increment
  returns T
- Replace bidirectional_iterator_extra_expr with is_detected_exact
  checks for pre/post decrement return types
- Add is_detected_exact comment and normalize its template formatting
- Strengthen is_sentinel_for to also require I satisfies is_input_iterator
@renatoGarcia renatoGarcia force-pushed the refactor/detection-idiom-improvements branch from 06804a3 to 078878a Compare April 22, 2026 03:15
@renatoGarcia renatoGarcia merged commit 65e7269 into master Apr 22, 2026
47 checks passed
@renatoGarcia renatoGarcia deleted the refactor/detection-idiom-improvements branch April 22, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant