gcc/testsuite/g++.dg/parse/constructor2.C
raw| 1 | // PR c++/14260 |
| 2 | |
| 3 | template <class TClass> |
| 4 | class T |
| 5 | { |
| 6 | public: |
| 7 | T(short,short f=0) {} |
| 8 | T<TClass>(int f) {} // { dg-error "template-id not allowed for constructor" "" { target c++20 } } |
| 9 | T<TClass>(int f=0,const char* b=0) {} // { dg-error "template-id not allowed for constructor" "" { target c++20 } } |
| 10 | }; |
| 11 |