This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


1580. Default arguments in explicit instantiations

Section: 9.3.4.7  [dcl.fct.default]     Status: drafting     Submitter: Daveed Vandevoorde     Date: 2012-10-29

It is not clear, either from 9.3.4.7 [dcl.fct.default] or 13.9.3 [temp.explicit], whether it is permitted to add a default argument in an explicit instantiation of a function template:

  template<typename T> void f(T, int) { }
  template void f<int>(int, int=0);  // Permitted?

Notes from the April, 2013 meeting:

The intent is to prohibit default arguments in explicit instantiations.