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, 7 insertions, 2 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 e898a48968..97e78fd791 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp @@ -5,6 +5,11 @@ struct X { void f() {} }; -template inline void X<int>::f(); // expected-error{{'inline'}} +template inline void X<int>::f(); // expected-error{{explicit instantiation cannot be 'inline'}} -// FIXME: test constexpr +template<typename T> +struct Y { + constexpr int f() { return 0; } +}; + +template constexpr int Y<int>::f(); // expected-error{{explicit instantiation cannot be 'constexpr'}} |