gcc/testsuite/g++.dg/cpp0x/pr71169-2.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | template <Preconditioner> class A { // { dg-error "declared" } |
| 4 | template <class = int> void m_fn1() { |
| 5 | m_fn1(); |
| 6 | } |
| 7 | }; |
| 8 | |
| 9 | template<typename> |
| 10 | struct B |
| 11 | { |
| 12 | int f(int = 0) { return 0; } |
| 13 | }; |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | B<int> b; |
| 18 | return b.f(); |
| 19 | } |