summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/explicit-specialization-member.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/explicit-specialization-member.cpp b/test/SemaTemplate/explicit-specialization-member.cpp
index 9ddbc04953..07d7389446 100644
--- a/test/SemaTemplate/explicit-specialization-member.cpp
+++ b/test/SemaTemplate/explicit-specialization-member.cpp
@@ -28,3 +28,22 @@ namespace PR12331 {
};
template<> struct S<int>::U { static const int n = sizeof(int); }; // expected-error {{explicit specialization of 'U' after instantiation}}
}
+
+namespace PR18246 {
+ template<typename T>
+ class Baz {
+ public:
+ template<int N> void bar();
+ };
+
+ template<typename T>
+ template<int N>
+ void Baz<T>::bar() {
+ }
+
+ // FIXME: Don't suggest the 'template<>' correction here, because this cannot
+ // be an explicit specialization.
+ template<typename T>
+ void Baz<T>::bar<0>() { // expected-error {{requires 'template<>'}}
+ }
+}