This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


15. Default arguments for parameters of function templates

Section:  [dcl.fct.default]     Status: dup     Submitter: unknown     Date: unknown [dcl.fct.default] paragraph 4 says:

For non-template functions, default arguments can be added in later declarations of a functions in the same scope.
Why say for non-template functions? Why couldn't the following allowed?
    template <class T> struct B {
        template <class U> inline void f(U);

    template <class T> template <class U>
    inline void B<T>::f(U = int) {} // adds default arguments
                                       // is this well-formed?
    void g()
        B<int> b;
If this is ill-formed, chapter 14 should mention this.

Rationale: This is sufficiently clear in the standard. Allowing additional default arguments would be an extension.

Notes from October 2002 meeting:

The example here is flawed. It's not clear what is being requested. One possibility is the extension introduced by issue 226. Other meanings don't seem to be useful.