diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp index 97e78fd791..80f0598cb1 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp @@ -13,3 +13,12 @@ struct Y { }; template constexpr int Y<int>::f(); // expected-error{{explicit instantiation cannot be 'constexpr'}} + +template<typename T> +struct Z { + enum E : T { e1, e2 }; + T t; // expected-note {{refers here}} +}; + +template enum Z<int>::E; // expected-error {{enumerations cannot be explicitly instantiated}} +template int Z<int>::t; // expected-error {{explicit instantiation of 't' does not refer to}} |