diff options
Diffstat (limited to 'test/SemaTemplate/extern-templates.cpp')
-rw-r--r-- | test/SemaTemplate/extern-templates.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaTemplate/extern-templates.cpp b/test/SemaTemplate/extern-templates.cpp index 5eb9c9db127c..acbc9d57122e 100644 --- a/test/SemaTemplate/extern-templates.cpp +++ b/test/SemaTemplate/extern-templates.cpp @@ -71,3 +71,10 @@ extern template void X1<const void*>::g(const void*); void g_X1_2(X1<const void *> x1, const void *ptr) { x1.g(ptr); } + +namespace static_const_member { + template <typename T> struct A { static const int n; }; + template <typename T> const int A<T>::n = 3; + extern template struct A<int>; + int arr[A<int>::n]; +} |