Debian Codegraph @

gcc/testsuite/g++.dg/tc1/dr217.C

raw
1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR217: Default arguments for non-template member functions of class
4 // templates
5
6 template <class T>
7 struct S
8 {
9 void foo (int);
10 };
11
12 template <class T>
13 void S<T>::foo (int = 0) // { dg-error "" "default arguments for parameters of member functions of class templates can be specified in the initial declaration only" }
14 { }