summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-12-21 14:38:44 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-12-21 14:38:44 -0500
commit57a6add274e98def9fe937eea126c56a71e65c28 (patch)
tree5853c8fc2ab669e19226a16b1a0d5c25d65ee0c3 /libstdc++-v3/testsuite
parenta9410b4fe946b3f82ff2254b46ef53573897d68e (diff)
downloadgcc-57a6add274e98def9fe937eea126c56a71e65c28.tar.gz
Fix handling of explicit function template arguments with TTPs.
gcc/cp/ * pt.c (coerce_template_parms): Consider variadic_args_p before complaining about too many template arguments. libstdc++-v3/ * testsuite/util/testsuite_tr1.h (test_property): Don't define both variadic and non-variadic overloads. From-SVN: r243869
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_tr1.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/libstdc++-v3/testsuite/util/testsuite_tr1.h b/libstdc++-v3/testsuite/util/testsuite_tr1.h
index c6a4986b983..908a788a93e 100644
--- a/libstdc++-v3/testsuite/util/testsuite_tr1.h
+++ b/libstdc++-v3/testsuite/util/testsuite_tr1.h
@@ -45,17 +45,6 @@ namespace __gnu_test
&& Category<const volatile Type>::type::value == value);
}
- template<template<typename> class Property, typename Type>
-#if __cplusplus >= 201103L
- constexpr
-#endif
- bool
- test_property(typename Property<Type>::value_type value)
- {
- return (Property<Type>::value == value
- && Property<Type>::type::value == value);
- }
-
// For testing tr1/type_traits/extent, which has a second template
// parameter.
template<template<typename, unsigned> class Property,
@@ -79,6 +68,14 @@ namespace __gnu_test
return (Property<Type1, Types...>::value == value
&& Property<Type1, Types...>::type::value == value);
}
+#else
+ template<template<typename> class Property, typename Type>
+ bool
+ test_property(typename Property<Type>::value_type value)
+ {
+ return (Property<Type>::value == value
+ && Property<Type>::type::value == value);
+ }
#endif
template<template<typename, typename> class Relationship,