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
LWG2754 The in_place constructors and emplace functions added by P0032R3 don't require CopyConstructible #1072
LWG2754 The in_place constructors and emplace functions added by P0032R3 don't require CopyConstructible #1072
Conversation
if \tcode{decay_t<ValueType>} is the same type as \tcode{any} or | ||
if \tcode{ValueType} is a specialization of \tcode{in_place_type_t}. | ||
This constructor shall not participate in overload resolution unless | ||
\tcode{T} is the same type as \tcode{any}, |
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.
is not the same??
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.
Oops, thanks.
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
\pnum | ||
Let \tcode{T} be equal to \tcode{decay_t<ValueType>}. |
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 would leave out "equal to" - it's not in the paper, it's inconsistent with other "Let"s, and it adds nothing.
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 added it in to be consistent with what was already there, e.g.
Line 4960 in ef536ae
Let \tcode{T} be equal to \tcode{decay_t<ValueType>}. |
I dislike "equal to" for a typedef though, so I'll change it. I quite like "shall denote" that we use elsewhere, but will just go with "Let T
be decay_t<ValueType>
"
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.
And it is in LWG 2754, for better or worse.
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.
Changed and force pushed.
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.
It's NOT in 2754 - you must be looking at the superceded versions. See http://wg21.cmeerw.net/lwg/issue2754 (or skip past the superceded versions in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0165r3.html).
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.
Oops, you're right, I was looking at the superseded version. Although confusingly, the final version says "Let T
be decay_t<ValueType>
." even for the existing text that isn't changed (which is wrong). Bah. Anyway, I changed it.
\remarks | ||
This constructor shall not participate in overload resolution unless | ||
\tcode{is_copy_constructible_v<T>} is \tcode{true} | ||
and \tcode{is_constructible_v<T, Args...>} 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.
fyi, folks usually put the conjunction ("and" in this case) at the end of the previous line. not that you need to change it here, but I try to keep the spec coding style consistent (I'm sure you've noticed we have a long way to go there!)
On second thought, can you go ahead and make this change anyway? (there are several occurrences in this patch) since this will be rebased anyway, might as well try to be consistent from the start :)
I.e. do:
bla bla and
bla bla
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.
FWIW I think that's the wrong choice, because if we have an Oxford comma then it seems natural to put the line break after the comma, and start the next line with the conjunction.
It also involves more editing for cases like:
case one,
case two,
case three, and
case four.
If you want to add a new case between three and four you have to edit an existing line, not just insert a new one:
case one,
case two,
case three, <DEL>and<DEL>
<INS>case three-point-five, and</INS>
case four.
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.
Changed and force pushed.
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 make a good point. I was simply following existing style - I will switch to doing things your way from now on, assuming others agree. Any one else have a preference?
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.
so you did change things after all... what do we want to stick with as a group? When reading the Latex, I like the conjunction the previous line. I like the way it lines up :)
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
\pnum | ||
Let \tcode{T} be equal to \tcode{decay_t<ValueType>}. |
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.
same with "equal to" here
void emplace(Args&&... args); | ||
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
\pnum | ||
\requires \tcode{is_constructible_v<T, Args...>} is \tcode{true}. | ||
Let \tcode{T} be equal to \tcode{decay_t<ValueType>}. |
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.
ditto for "equal to"
void emplace(initializer_list<U> il, Args&&... args); | ||
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
\pnum | ||
Let \tcode{T} be equal to \tcode{decay_t<ValueType>}. |
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.
ditto for "equal to"
8366e9e
to
f84cd47
Compare
e5153d0
to
ec4e433
Compare
…2R3 don't require CopyConstructible Also includes the changes to [ans.cons] p9 from P0504R0 (LWG Motion 19) which modify the same paragraph.
ec4e433
to
be1a013
Compare
This is ready to go now right? Can you merge it into the motions branch? Or maybe I should ask: if I clicked "squash and merge", would it go to the motions branch or master? |
Hmm - probably shouldn't have closed until you committed right? |
I see - you can tell the base from the line at the top: "wants to merge 1 commit into cplusplus:motions-2016-11-lwg-11 from jwakely:motions-2016-11-lwg-11" So this will go to the motions branch. Great - will merge then... |
Yep, I created the pull request so it would only add to the branch, not master - thanks! |
Also includes the changes to [ans.cons] p9 from P0504R0 (LWG Motion 19)
which modify the same paragraph.