This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
Section: 17.9.8 [except.nested] Status: C++11 Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [except.nested].
View all issues with C++11 status.
The throw_with_nested specification passes in its argument as T&& (perfect forwarding pattern), but then discusses requirements on T without taking into account that T may be an lvalue-reference type. It is also not clear in the spec that t is intended to be perfectly forwarded.
[ Resolution proposed by ballot comment ]
Patch [except.nested] p6-7 to match the intent with regards to requirements on T and the use of std::forward<T>(t).
[ 2010-10-24 Daniel adds: ]
Accepting n3144 would solve this issue.
[2010-11-10 Batavia: LWG accepts Howard's updated wording with corrected boo boos reported by Sebastian Gesemann and Pete Becker, which is approved for Immediate adoption this meeting.]
[ Adopted at 2010-11 Batavia ]
Change 18.8.7 nested_exception [except.nested] as indicated:
[[noreturn]] template <class T> void throw_with_nested(T&& t);
Tshall be CopyConstructible.
7 Throws: If
Tis a non-union class type not derived from nested_exception, an exception of unspecified type that is publicly derived from both Tand nested_exception , otherwise t.