summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic134.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic134.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic134.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic134.C b/gcc/testsuite/g++.dg/cpp0x/variadic134.C
new file mode 100644
index 000000000..b7ec40c04
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic134.C
@@ -0,0 +1,17 @@
+// PR c++/53862
+// { dg-options "-std=c++0x" }
+
+typedef unsigned long size_t;
+
+template<typename> struct is_scalar { static const bool value = true; };
+template<bool, typename T> struct enable_if { typedef T type; };
+
+template <size_t N, typename... Args>
+void f(Args...) {}
+
+template <size_t N, typename T, typename... Args>
+typename enable_if<is_scalar<T>::value, void>::type f(T, Args...) {}
+
+int main() {
+ f<1>(1);
+}