1// PR c++/59988
2// { dg-do compile { target c++11 } }
3
4template<template<typename...> class C, typename... T>
5struct is_valid_specialization {
6  typedef struct { char _; } yes;
7  typedef struct { yes _[2]; } no;
8
9  template<template<typename...> class D, typename... U>
10  static yes test(D<U...>*);
11  template<template<typename...> class D, typename... U>
12  static no test(...);
13
14  constexpr static bool value = (sizeof(test<C, T...>(0)) == sizeof(yes));
15};
16
17template<typename T>
18struct Test1 { };
19
20template<typename T1, typename T2>
21struct Test2 { };
22
23template<typename...>
24struct TestV { };
25
26static_assert(!is_valid_specialization<Test1, int>::value, "");
27static_assert(!is_valid_specialization<Test2, int>::value, "");
28static_assert(!is_valid_specialization<TestV, int>::value, "");
29