This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/66338] std::forward_as_tuple() issue with single argument
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 30 May 2015 10:06:36 +0000
- Subject: [Bug libstdc++/66338] std::forward_as_tuple() issue with single argument
- Auto-submitted: auto-generated
- References: <bug-66338-4 at http dot gcc dot gnu dot org/bugzilla/>
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