https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65396

            Bug ID: 65396
           Summary: Function template default template arguments not
                    merged
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david at stellarscience dot com

template <typename T, T *> void f();

template <typename T, T * = nullptr> void f() {}

int main() { f<int>(); }

------------------------

gcc inaccurately rejects this program, which is violating the following
sentence from [C++11 14.1 p10]

The set of default template-arguments available for use with a template
declaration or definition is obtained by merging the default arguments from the
definition (if in scope) and all declarations in scope in the same way default
function arguments are (8.3.6).

Reply via email to