diff options
Diffstat (limited to 'test/SemaCXX/cxx1z-class-template-argument-deduction.cpp')
-rw-r--r-- | test/SemaCXX/cxx1z-class-template-argument-deduction.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp b/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp index d6374e4ce9075..5de228ad28574 100644 --- a/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp +++ b/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp @@ -213,3 +213,38 @@ namespace transform_params { }; D d(Y<0, 1, 2>{}); } + +namespace variadic { + int arr3[3], arr4[4]; + + // PR32673 + template<typename T> struct A { + template<typename ...U> A(T, U...); + }; + A a(1, 2, 3); + + template<typename T> struct B { + template<int ...N> B(T, int (&...r)[N]); + }; + B b(1, arr3, arr4); + + template<typename T> struct C { + template<template<typename> typename ...U> C(T, U<int>...); + }; + C c(1, a, b); + + template<typename ...U> struct X { + template<typename T> X(T, U...); + }; + X x(1, 2, 3); + + template<int ...N> struct Y { + template<typename T> Y(T, int (&...r)[N]); + }; + Y y(1, arr3, arr4); + + template<template<typename> typename ...U> struct Z { + template<typename T> Z(T, U<int>...); + }; + Z z(1, a, b); +} |