2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-Wno-return-type" }
7 template < typename _Tp, _Tp __v > struct integral_constant
9 static const _Tp value = __v;
11 typedef integral_constant < bool, false > false_type;
12 template < typename > struct is_array:false_type
15 template < typename > struct is_function:false_type
18 template < typename _Tp > struct remove_const
22 template < typename _Tp > struct remove_volatile
26 template < typename _Tp > struct remove_cv
28 typedef typename remove_const < typename remove_volatile <
29 _Tp >::type >::type type;
31 template < typename > struct remove_reference
34 template < typename _Tp > struct remove_reference <_Tp & >
38 template < typename _Up, bool = is_array < _Up >::value, bool =
39 is_function < _Up >::value > struct __decay_selector;
40 template < typename _Up > struct __decay_selector <_Up, false, false >
42 typedef typename remove_cv < _Up >::type __type;
44 template < typename _Tp > class decay
46 typedef typename remove_reference < _Tp >::type __remove_type;
47 public:typedef typename __decay_selector <
48 __remove_type >::__type type;
50 template < typename _Tp > struct __strip_reference_wrapper
54 template < typename _Tp > struct __decay_and_strip
56 typedef typename __strip_reference_wrapper < typename decay <
57 _Tp >::type >::__type __type;
59 template < typename _Tp > _Tp forward (typename remove_reference <
63 template < class _T1, class _T2 > struct pair
67 constexpr pair (_T1, _T2 &):first (), second (__b) // { dg-error "was not declared in this scope" }
72 class _T2 > pair < typename __decay_and_strip < _T1 >::__type,
73 typename __decay_and_strip < _T2 >::__type > make_pair (_T1 && __x, _T2
76 typedef typename __decay_and_strip < _T1 >::__type __ds_type1;
77 typedef typename __decay_and_strip < _T2 >::__type __ds_type2;
78 typedef pair < __ds_type1, __ds_type2 > __pair_type;
79 __pair_type (forward < _T1 > (__x), std::forward < _T2 > (__y));
86 template < typename > class allocator;
87 template < class > struct char_traits;
88 template < typename _CharT, typename = char_traits < _CharT >, typename =
89 allocator < _CharT > >class basic_string;
90 typedef basic_string < char >string;
94 template < bool > class __pool;
95 template < template < bool > class, bool > struct __common_pool
98 template < template < bool > class, bool > struct __common_pool_base;
99 template < template < bool > class _PoolTp >
100 struct __common_pool_base <_PoolTp, true >:__common_pool < _PoolTp, true >
103 template < template < bool > class _PoolTp,
104 bool _Thread > struct __common_pool_policy:__common_pool_base < _PoolTp,
107 template < typename, template < bool > class _PoolTp1 =
108 _PoolTp, bool _Thread1 = _Thread > struct _M_rebind
110 typedef __common_pool_policy < _PoolTp1, _Thread1 > other;
113 template < typename _Tp > class __mt_alloc_base
116 template < typename _Tp, typename _Poolp = __common_pool_policy < __pool, true > >class __mt_alloc:public __mt_alloc_base <
120 public:size_t size_type;
121 typedef _Tp value_type;
122 template < typename _Tp1, typename _Poolp1 = _Poolp > struct rebind
124 typedef typename _Poolp1::template _M_rebind < _Tp1 >::other pol_type;
125 typedef __mt_alloc < _Tp1, pol_type > other;
132 template < typename _Tp > class allocator:public __gnu_cxx::__mt_alloc <
136 template < typename, typename > struct unary_function
139 template < typename, typename, typename > struct binary_function
142 template < typename _Tp > struct equal_to:binary_function < _Tp, _Tp, bool >
149 template < class > struct hash;
150 template < class K, class T, class = hash < K >, class =
151 std::equal_to < K >, class =
152 std::allocator < std::pair < const K, T > >>class unordered_map;
153 template < >struct hash <std::string >:std::unary_function < std::string,
157 namespace unordered_detail
159 template < class Alloc, class T > struct rebind_wrap
161 typedef typename Alloc::template rebind < T >::other type;
164 namespace unordered_detail
166 size_t default_bucket_count;
167 template < class, class > struct map_extractor;
171 template < class T > class hash_table:T::buckets, T::buffered_functions
174 template < class, class, class H, class P, class A, class, class G > struct types
178 typedef A value_allocator;
180 template < class T > class hash_unique_table:T
182 public:typedef typename T::hasher hasher;
183 typedef typename T::key_equal key_equal;
184 typedef typename T::value_allocator value_allocator;
185 typedef typename T::table table;
186 hash_unique_table (size_t n, hasher, key_equal,
187 value_allocator & a):table (n, a) // { dg-error "is not a direct base" }
191 template < class K, class H, class P, class A > struct map:types < K,
192 typename A::value_type, H, P, A, map_extractor < K,
193 typename A::value_type >, ungrouped >
195 typedef hash_unique_table < map < K, H, P, A > >impl;
196 typedef hash_table < map < K, H, P, A > >table;
199 template < class K, class T, class H, class P, class A > class unordered_map
201 typedef std::pair < const K, T > value_type;
204 typedef A allocator_type;
205 typedef typename unordered_detail::rebind_wrap < allocator_type,
206 value_type >::type value_allocator;
207 typedef boost::unordered_detail::map < K, H, P, value_allocator > types;
208 typedef typename types::impl table;
209 typedef size_t size_type;
210 private:table table_;
211 public: unordered_map (size_type n = boost::unordered_detail::default_bucket_count,
212 hasher hf = hasher (), key_equal eql = key_equal (),
213 allocator_type a = allocator_type ()):table_ (n, hf, eql, a) // { dg-message "required" }
222 typedef boost::unordered_map < std::string, int >Name2Port;
223 Name2Port b; // { dg-message "required" }
224 std::make_pair (a, b);