Refine detection idiom and type traits#102
Merged
Merged
Conversation
Owner
renatoGarcia
commented
Apr 21, 2026
- 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
06804a3 to
078878a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.