aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C
new file mode 100644
index 0000000..0265f09
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C
@@ -0,0 +1,46 @@
+// PR c++/53039
+// { dg-do compile { target c++11 } }
+
+template <class, class>
+struct is_convertible
+{
+ static const bool value = true;
+};
+
+template<bool, class T>
+struct enable_if
+{
+ typedef T type;
+};
+
+template <bool...>
+struct Xs
+{
+ static const bool value = true;
+};
+
+template<typename... BTs>
+ class BType
+ {
+ template <typename... BUs,
+ typename enable_if<
+ Xs<is_convertible<BUs, BTs>::value...>::value,
+ bool>::type = false>
+ void fooX(BUs&&...);
+ };
+
+template <typename... ATs>
+ struct AType
+ {
+ template <typename... AUs,
+ typename enable_if<
+ Xs<is_convertible<AUs, ATs>::value...>::value,
+ bool>::type = false>
+ void foo(AUs&&...);
+ };
+
+int main()
+{
+ AType<int, int> t;
+ t.foo(1, 1);
+}