1 // PR c++/57016
2 // { dg-require-effective-target c++11 }
3 
4 template < typename _Tp, _Tp __v > struct integral_constant
5 {
6   static constexpr _Tp value = __v;
7 };
8 template < bool, typename, typename > struct conditional;
9 template < typename ... >struct __and_;
10 template
11   <
12   typename
13   _B1,
14   typename
15   _B2 > struct __and_ <_B1, _B2 >:conditional < _B1::value, _B2, _B1 >::type
16 {};
17 template < typename _Pp > struct __not_:integral_constant < bool, _Pp::value >
18 {};
19 template < typename > struct add_rvalue_reference;
20 template
21   < typename _Tp > typename add_rvalue_reference < _Tp >::type declval ();
22 template < bool, typename _Iftrue, typename > struct conditional
23 {
24   typedef _Iftrue type;
25 };
26 template < class, class > struct pair;
27 template < typename > class allocator;
28 template < typename, typename, typename > struct binary_function;
29 template < typename _Tp > struct equal_to:binary_function < _Tp, _Tp, bool >
30 {};
31 template < typename > struct hash;
32 template < >struct hash <int >
33 {};
34 template
35   <
36   typename,
37   typename,
38   typename,
39   typename, typename, typename, typename, typename > struct _Hashtable_base;
40 template
41   <
42   typename,
43   typename
44   > struct __is_noexcept_hash:integral_constant < bool, noexcept ((declval)) >
45 {}
46 ;
47 struct _Identity;
48 template < bool, bool _Constant_iterators, bool > struct _Hashtable_traits
49  ;
50 struct _Mod_range_hashing;
51 struct _Default_ranged_hash;
52 struct _Prime_rehash_policy;
53 template
54   <
55   typename
56   _Tp,
57   typename
58   _Hash
59   >
60   using
61   __cache_default
62   =
63   __not_
64   <
65   __and_
66   <
67   integral_constant
68   < bool, __is_final (_Hash) >, __is_noexcept_hash < _Tp, _Hash > >>;
69 template < typename _Key, typename _Value, typename, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename, typename _RehashPolicy, typename _Traits > class _Hashtable:
70 _Hashtable_base
71   < _Key, _Value, _ExtractKey, _Equal, _H1, _H2, _RehashPolicy, _Traits >
72 {}
73 ;
74 template
75   <
76   bool
77   _Cache > using __uset_traits = _Hashtable_traits < _Cache, true, true >;
78 template
79   <
80   typename
81   _Value,
82   typename
83   _Hash
84   =
85   hash
86   <
87   _Value
88   >,
89   typename
90   _Pred
91   =
92   equal_to
93   <
94   _Value
95   >,
96   typename
97   _Alloc
98   =
99   allocator
100   <
101   _Value
102   >,
103   typename
104   _Tr
105   =
106   __uset_traits
107   <
108   __cache_default
109   <
110   _Value,
111   _Hash
112   >::value
113   >
114   >
115   using
116   __uset_hashtable
117   =
118   _Hashtable
119   <
120   _Value,
121   _Value,
122   _Alloc,
123   _Identity,
124   _Pred,
125   _Hash,
126   _Mod_range_hashing, _Default_ranged_hash, _Prime_rehash_policy, _Tr >;
127 template < class _Value, class = hash < _Value > >class unordered_set
128 {
129   typedef __uset_hashtable < _Value > iterator;
130   template < typename > pair < iterator, bool > emplace ();
131 }
132 ;
133 template class unordered_set < int >;
134