-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[linalg.conj.conjugated] Rearrange to match P3050R3 #7506
base: main
Are you sure you want to change the base?
Conversation
This was the wording requested by LWG and approved in P3050R3, but I mistakenly put P3050R2 in the straw polls.
@mhoemmen another fix for an incorrect straw poll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this against P3050R3; it looks good! Thanks! : - )
otherwise, | ||
\tcode{a}, if \tcode{is_same_v<A, Accessor>} is \tcode{true}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this editorially-obviously related to the struck text talking about conj(E)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to read the preceding paragraph too. In R2 (as applied to the draft) the text in p2 talking about conj(E) was duplicating exactly the condition in 1.3, which was just unnecessarily verbose and repetitive.
We don't need to repeat exactly the two conditions in 1.2 and 1.3 as 2.2 and 2.3, we can just say that if the type A
determined in p2 is Accessor
, then we return a
.
So this is replacing everything in p2 that repeats conditions from p1 by specifying the return value in terms of what was determined in p1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, previously we had:
-
(1.2)
Accessor
ifremove_cvref_t<ElementType>
is an arithmetic type; otherwise, -
(1.3)
Accessor
if the expressionconj(E)
is not valid for any subexpression E whose typeT
is expression-equivalent toremove_cvref_t<ElementType>
with overload resolution performed in a context that includes the declarationtemplate<class T> conj(const T&) = delete;
; otherwise,
and
-
(2.2)
a
ifremove_cvref_t<ElementType>
is an arithmetic type; otherwise, -
(2.3)
a
if the expressionconj(E)
is not valid for any subexpression E whose typeT
is expression-equivalent toremove_cvref_t<ElementType>
with overload resolution performed in a context that includes the declarationtemplate<class T> conj(const T&) = delete;
; otherwise,
But now p2 just says we return a
if it's already the right type and doesn't need to be transformed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation.
Co-authored-by: timsong-cpp <[email protected]>
This was the wording requested by LWG and approved in P3050R3, but I mistakenly put P3050R2 in the straw polls.