gcc/testsuite/g++.dg/ext/static1.C
raw| 1 | // PR c++/23699 |
| 2 | // { dg-options "" } |
| 3 | |
| 4 | template<typename _CharT > class basic_string; |
| 5 | typedef basic_string<char> string; |
| 6 | template<typename _CharT> |
| 7 | struct basic_string |
| 8 | { |
| 9 | static const int npos = -1; |
| 10 | }; |
| 11 | template<typename _CharT> |
| 12 | const int basic_string<_CharT>::npos; |
| 13 | |
| 14 | extern template class basic_string<char>; |
| 15 | struct A |
| 16 | { |
| 17 | static const long npos = string::npos; |
| 18 | }; |