2 // { dg-do compile { target c++11 } }
4 template<template<typename...> class C, typename... T>
5 struct is_valid_specialization {
6 typedef struct { char _; } yes;
7 typedef struct { yes _[2]; } no;
9 template<template<typename...> class D, typename... U>
10 static yes test(D<U...>*);
11 template<template<typename...> class D, typename... U>
14 constexpr static bool value = (sizeof(test<C, T...>(0)) == sizeof(yes));
20 template<typename T1, typename T2>
26 static_assert(!is_valid_specialization<Test1, int>::value, "");
27 static_assert(!is_valid_specialization<Test2, int>::value, "");
28 static_assert(!is_valid_specialization<TestV, int>::value, "");