Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-targ3.C

raw
1 // PR c++/67108
2 // { dg-do compile { target c++11 } }
3
4 template < typename, typename > struct is_same;
5 template < typename T > struct is_same <T, T >
6 {
7 enum
8 {
9 value = true
10 }
11 ;
12 constexpr bool operator () ()
13 {
14 return value;
15 }
16 }
17 ;
18 template < bool, typename = void >struct enable_if;
19 template < typename T > struct enable_if <true, T >
20 {
21 typedef T type;
22 }
23 ;
24 struct A;
25 template < typename, typename = void >struct F;
26 template < typename X > struct F <X, typename enable_if < is_same < X, A >
27 {
28 }
29 () >::type >
30 {
31 template < typename MakeDependent > F (MakeDependent)
32 {
33 }
34 }
35 ;
36
37 int main ()
38 {
39 F < A > (1);
40 }