This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/66338] std::forward_as_tuple() issue with single argument


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66338

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think this is expected, because your type S has an unconstrained constructor
template that accepts any argument, including objects of type tuple<S>, but in
the signature of that constructor (specifically in the exception-specification)
you use the argument in an expression that might be invalid.

The tuple constructor is constexpr, so that invalid expression causes an error.

I'm not sure, but this might be fixed by implementing this change to the
standard: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4387


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]