1 // PR c++/70563
2 // { dg-do compile { target c++11 } }
3 
4 template<typename... T> using void_t = void;
5 
6 template<typename T> struct TemporaryBindObject
7 {
8 };
9 
10 struct MyTrueType
11 {
12  static constexpr bool value = true;
13 };
14 
15 struct MyFalseType
16 {
17  static constexpr bool value = false;
18 };
19 
20 template<template<typename...> class Dest> struct TestValidBind
21 {
22  template<typename T, typename = void_t<>> struct toTypesOf : MyFalseType
23  {};
24  template<template<typename...> class Src, typename... Ts> struct toTypesOf<Src<Ts...>, void_t<Dest<Ts...,float>>> : MyTrueType
25  {};
26 };
27 
28 template<typename T> struct OneParamStruct
29 {
30 };
31 template<typename T1, typename T2> struct TwoParamStruct
32 {
33 };
34 
35 using tmp = TemporaryBindObject<int>;
36 
37 int main()
38 {
39  bool value1 = TestValidBind<TwoParamStruct>::toTypesOf<TemporaryBindObject<int>>::value;
40  bool value2 = TestValidBind<OneParamStruct>::toTypesOf<TemporaryBindObject<int>>::value;
41 }
42