On 28/02/18 15:12 +0200, Ville Voutilainen wrote:
>- // Payload for constexpr optionals.
>+ // Payload for optionals with non-trivial destructor.
> template <typename _Tp,
> bool /*_HasTrivialDestructor*/ =
>+ bool /*_HasTrivialCopyAssignment*/ =
>+ bool /*_HasTrivialMoveAssignment*/ =
I'm not sure these comments are very useful, as they just repeat the
info that the traits already give us. Also, you could use the _v
variable templates if you wanted (doesn't make much difference
But on the subject of redundant comments ...
> struct _Optional_payload
It took me a minute to figure out which conditions the primary
template gets used for, to double-check the comment. Would it be
helpful to use a comment like:
struct _Optional_payload // <false, _TrivialCopy, _TrivialMove>
or does that not really clarify anything?
I suppose it doesn't tell us any more than the "non-trivial
destructor" comment you already have.
So OK for trunk then.