gcc/testsuite/g++.dg/template/spec41.C
raw| 1 | // PR c++/94255 - crash with template spec in different namespace. |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | namespace N { |
| 5 | class S { |
| 6 | template <typename> struct foo; |
| 7 | }; |
| 8 | namespace M { |
| 9 | using S = ::N::S; |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | namespace N { |
| 14 | namespace M { |
| 15 | template <> struct S::foo<int> {}; // { dg-error "specialization of" } |
| 16 | } |
| 17 | } |