diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.explicit/p3.cpp')
| -rw-r--r-- | test/CXX/temp/temp.spec/temp.explicit/p3.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p3.cpp b/test/CXX/temp/temp.spec/temp.explicit/p3.cpp index 48c42c399a46..38ae7688a0b5 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p3.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat %s // A declaration of a function template shall be in scope at the point of the // explicit instantiation of the function template. @@ -72,3 +72,10 @@ namespace PR7979 { template <typename T> int S<T>::i; template <typename T> void S<T>::S2::h() {} } + +namespace PR11599 { + template <typename STRING_TYPE> class BasicStringPiece; // expected-note {{template is declared here}} + + extern template class BasicStringPiece<int>; // expected-error{{explicit instantiation of undefined template 'PR11599::BasicStringPiece<int>}} + template class BasicStringPiece<int>; +} |
