This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Moved to DR at the November, 2014 meeting.]
According to 13.7.4 [temp.variadic] paragraph 6, describingan empty pack expansion,
WhenN is zero, the instantiation of the expansion produces an emptylist. Such an instantiation does not alter the syntactic interpretation ofthe enclosing construct, even in cases where omitting the list entirelywould otherwise be ill-formed or would result in an ambiguity in thegrammar.
This leaves open the question of whether something like
template<typename...T> void f() throw(T...);
should be considered to have a non-throwingexception-specification whenT... is empty. The definitionin 14.5 [except.spec] paragraph 12 appears to be syntacticregardingdynamic-exception-specifications:
Anexception-specification isnon-throwing if it is of theformthrow(),noexcept,ornoexcept(constant-expression) wheretheconstant-expression yieldstrue. A function with anon-throwingexception-specification does not allow any exceptions.
It seems evident, however, that adynamic-exception-specificationwith an empty pack expansion “does not allow any exceptions.”
Proposed resolution (February, 2014):
Change 14.5 [except.spec] paragraph 12 as follows:
A function with noexception-specification or withanexception-specification of the formnoexcept(constant-expression) wheretheconstant-expression yieldsfalse allows allexceptions. Anexception-specification isnon-throwing if it isof the formthrow(),noexcept, ornoexcept(constant-expression) where theadynamic-exception-specificationwhose set of adjusted types is empty (after any packs are expanded) or anoexcept-specification whoseconstant-expressionis either absent or yieldstrue. A function with anon-throwingexception-specification does not allow any exceptions.