gcc/testsuite/g++.dg/cpp0x/explicit-inst1.C
raw| 1 | // In C++11 explicit instantiation without a nested-name-specifier must be in |
| 2 | // the same namespace. |
| 3 | |
| 4 | namespace N { |
| 5 | template <class T> class foo {}; |
| 6 | template <class T> class bar {}; |
| 7 | } |
| 8 | |
| 9 | using N::bar; |
| 10 | template class bar<int>; // { dg-error "" "" { target c++11 } } |
| 11 | |
| 12 | using namespace N; |
| 13 | template class foo<int>; // { dg-error "" "" { target c++11 } } |