gcc/testsuite/g++.dg/cpp0x/extern_template-6.C
raw| 1 | // PR c++/99066 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename a> struct basic_string { |
| 5 | static const int npos = 1; |
| 6 | }; |
| 7 | template <typename a> const int basic_string<a>::npos; |
| 8 | |
| 9 | struct e { template <bool> int f() const; }; |
| 10 | |
| 11 | template <bool> int e::f() const { |
| 12 | return basic_string<char>::npos; |
| 13 | } |
| 14 | |
| 15 | extern template class basic_string<char>; |
| 16 | |
| 17 | // { dg-final { scan-assembler-not "_ZN12basic_stringIcE4nposE" } } |