diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp index 1032a87..2295235 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp @@ -237,3 +237,15 @@ void test_func_template(N0::X0<void *> xvp, void *vp, const void *cvp, xvp.ft1(vp, i); xvp.ft1(vp, u); } + +namespace PR8979 { + template<typename Z> + struct X0 { + template <class T, class U> class Inner; + struct OtherInner; + template<typename T, typename U> void f(Inner<T, U>&); + + typedef Inner<OtherInner, OtherInner> MyInner; + template<> void f(MyInner&); // expected-error{{cannot specialize a function 'f' within class scope}} + }; +} |