[2026-03 LWG Motion 17] P3978R3 constant_wrapper should unwrap on call and subscript#8884
Open
mattkretz wants to merge 1 commit intocplusplus:mainfrom
Open
[2026-03 LWG Motion 17] P3978R3 constant_wrapper should unwrap on call and subscript#8884mattkretz wants to merge 1 commit intocplusplus:mainfrom
mattkretz wants to merge 1 commit intocplusplus:mainfrom
Conversation
eisenwave
suggested changes
Mar 29, 2026
|
|
||
| \pnum | ||
| \constraints | ||
| \placeholder{call-expr} is a valid expression. |
Member
There was a problem hiding this comment.
Suggested change
| \placeholder{call-expr} is a valid expression. | |
| \tcode{\placeholder{call-expr}} is a valid expression. |
|
|
||
| \pnum | ||
| \constraints | ||
| \placeholder{subscr-expr} is a valid expression. |
Member
There was a problem hiding this comment.
Suggested change
| \placeholder{subscr-expr} is a valid expression. | |
| \tcode{\placeholder{subscr-expr}} is a valid expression. |
| The exception specification is equivalent to \tcode{noexcept(\placeholder{call-expr})}. | ||
| \end{itemdescr} | ||
|
|
||
| \begin{itemdecl} |
Member
There was a problem hiding this comment.
Suggested change
| \begin{itemdecl} | |
| \indexlibrarymember{operator[]}{constant_wrapper}% | |
| \begin{itemdecl} |
| Initialize elements of \exposid{data} with corresponding elements of \tcode{arr}. | ||
| \end{itemdescr} | ||
|
|
||
| \begin{itemdecl} |
Member
There was a problem hiding this comment.
Suggested change
| \begin{itemdecl} | |
| \indexlibrarymember{operator()}{constant_wrapper}% | |
| \begin{itemdecl} |
eisenwave
suggested changes
Mar 29, 2026
| \tcode{remove_cvref_t<Args>...} satisfy \exposconcept{constexpr-param} and | ||
| \tcode{constant_wrapper<\placeholder{INVOKE}(val\-ue, | ||
| remove_cvref_t<Args>::value...)>} is a valid type, otherwise let | ||
| \placeholder{call-expr} be \tcode{\placeholder{INVOKE}(value, |
Member
There was a problem hiding this comment.
Suggested change
| \placeholder{call-expr} be \tcode{\placeholder{INVOKE}(value, | |
| \tcode{\placeholder{call-expr}} be \tcode{\placeholder{INVOKE}(value, |
| \tcode{constant_wrapper<value[remove_cvref_t<Args>::value...]>\{\}} if all | ||
| types in \tcode{remove_cvref_t<Args>...} satisfy \exposconcept{constexpr-param} | ||
| and \tcode{constant_wrapper<value[remove_cv\-ref_t<Args>::value...]>} is a valid | ||
| type, otherwise let \placeholder{subscr-expr} be |
Member
There was a problem hiding this comment.
Suggested change
| type, otherwise let \placeholder{subscr-expr} be | |
| type, otherwise let \tcode{\placeholder{subscr-expr}} be |
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.
All applied except the move from
<type_traits>to<utility>. I'm not confident to do the latter. Feel free to reuse this commit even if it loses my authorship info.