diff options
Diffstat (limited to 'test/SemaCXX/cxx1y-variable-templates_top_level.cpp')
-rw-r--r-- | test/SemaCXX/cxx1y-variable-templates_top_level.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/SemaCXX/cxx1y-variable-templates_top_level.cpp b/test/SemaCXX/cxx1y-variable-templates_top_level.cpp index a78548b6f128f..ddc9c8a6b25bf 100644 --- a/test/SemaCXX/cxx1y-variable-templates_top_level.cpp +++ b/test/SemaCXX/cxx1y-variable-templates_top_level.cpp @@ -30,8 +30,8 @@ namespace use_in_top_level_funcs { void no_deduce() { // template arguments are not deduced for uses of variable templates. - int ipi = pi; // expected-error {{cannot refer to variable template 'pi' without a template argument list}} - int icpi = cpi; // expected-error {{cannot refer to variable template 'cpi' without a template argument list}} + int ipi = pi; // expected-error {{use of variable template 'pi' requires template arguments}} + int icpi = cpi; // expected-error {{use of variable template 'cpi' requires template arguments}} } template<typename T> @@ -409,7 +409,7 @@ namespace nested { #endif float f1 = pi1a<float>; - template<> double pi1a<double> = 5.2; // expected-error {{variable template specialization of 'pi1a' must originally be declared in namespace 'n1'}} + template<> double pi1a<double> = 5.2; // expected-error {{not in a namespace enclosing 'n1'}} double d1 = pi1a<double>; } @@ -422,8 +422,7 @@ namespace nested { #endif float f1 = n1::pi1b<float>; - template<> double n1::pi1b<double> = 5.2; // expected-error {{cannot define or redeclare 'pi1b' here because namespace 'use_n1b' does not enclose namespace 'n1'}} \ - // expected-error {{variable template specialization of 'pi1b' must originally be declared in namespace 'n1'}} + template<> double n1::pi1b<double> = 5.2; // expected-error {{not in a namespace enclosing 'n1'}} double d1 = n1::pi1b<double>; } } @@ -466,5 +465,5 @@ auto variadic2 = Variadic<int, int>; namespace VexingParse { template <typename> int var; // expected-note {{declared here}} - int x(var); // expected-error {{cannot refer to variable template 'var' without a template argument list}} + int x(var); // expected-error {{use of variable template 'var' requires template arguments}} } |