]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/pr57101.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr57101.C
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fcompare-debug" }
3
4 typedef __SIZE_TYPE__ size_t;
5 namespace
6 {
7 template < typename _Tp, _Tp __v > struct integral_constant
8 {
9 static const _Tp value = __v;
10 };
11 typedef integral_constant < bool, false > false_type;
12 template < typename > struct remove_cv;
13 template < typename > struct __is_void_helper:false_type
14 {
15 };
16 template
17 <
18 typename
19 _Tp
20 >
21 struct
22 is_void:integral_constant
23 < bool, (__is_void_helper < typename remove_cv < _Tp >::type >::value) >
24 {
25 };
26 template < typename > struct is_function:false_type
27 {
28 };
29 template < typename _Tp > struct remove_const
30 {
31 typedef _Tp type;
32 };
33 template < typename _Tp > struct remove_volatile
34 {
35 typedef _Tp type;
36 };
37 template < typename _Tp > struct remove_cv
38 {
39 typedef
40 typename
41 remove_const < typename remove_volatile < _Tp >::type >::type type;
42 };
43 template < typename > struct is_lvalue_reference:false_type
44 {
45 };
46 template < typename _Tp, bool = is_void < _Tp >::value > struct __add_rvalue_reference_helper
47 {
48 typedef _Tp type;
49 };
50 template
51 <
52 typename
53 _Tp > struct add_rvalue_reference:__add_rvalue_reference_helper < _Tp >
54 {
55 };
56 template
57 < typename _Tp > typename add_rvalue_reference < _Tp >::type declval ();
58 template
59 <
60 typename,
61 typename
62 _To, bool = (is_function < _To >::value) > struct __is_convertible_helper;
63 template
64 <
65 typename
66 _From, typename _To > struct __is_convertible_helper <_From, _To, false >
67 {
68 static const bool __value = sizeof ((declval < _From > ()));
69 };
70 template
71 <
72 typename
73 _From,
74 typename
75 _To
76 >
77 struct
78 is_convertible:integral_constant
79 < bool, __is_convertible_helper < _From, _To >::__value >
80 {
81 };
82 template < bool, typename _Tp = void >struct enable_if
83 {
84 typedef _Tp type;
85 };
86 template < typename _Tp > struct identity
87 {
88 typedef _Tp type;
89 };
90 template
91 <
92 typename
93 _Tp
94 >
95 typename
96 enable_if
97 <
98 is_lvalue_reference
99 < _Tp >::value, _Tp >::type forward (typename identity < _Tp >::type)
100 {
101 return 0;
102
103 }
104 template < class _T1, class > struct pair
105 {
106 _T1 first;
107 template < class _U1, class = typename enable_if < is_convertible < _U1, _T1 >::value >::type > pair (_U1 __x):
108 first
109 (forward < _U1 > (__x))
110 {
111 }
112 };
113 }
114
115 namespace __gnu_cxx
116 {
117 template < typename > class new_allocator
118 {
119 };
120 }
121
122 namespace std
123 {
124 template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp >
125 {
126 public:
127 template < typename > struct rebind
128 {
129 typedef allocator other;
130 };
131 };
132 template < typename, typename > struct unary_function;
133 template < typename, typename, typename > struct binary_function
134 {
135 };
136 template < typename _Tp > struct less:binary_function < _Tp, _Tp, bool >
137 {
138 };
139 template
140 <
141 typename
142 _Pair
143 > struct _Select1st:unary_function < _Pair, typename _Pair::first_type >
144 {
145 };
146 template < typename > struct _Rb_tree_node;
147 template
148 <
149 typename,
150 typename
151 _Val,
152 typename,
153 typename _Compare, typename _Alloc = allocator < _Val > >class _Rb_tree
154 {
155 typedef
156 typename
157 _Alloc::template
158 rebind < _Rb_tree_node < _Val > >::other _Node_allocator;
159 public:
160 typedef _Alloc allocator_type;
161 template < typename _Key_compare > struct _Rb_tree_impl
162 {
163 _Rb_tree_impl (_Key_compare, _Node_allocator); // { dg-warning "used but never defined" }
164 };
165 _Rb_tree_impl < _Compare > _M_impl;
166 _Rb_tree (_Compare __comp, allocator_type __a):
167 _M_impl (__comp, __a)
168 {
169 }
170 };
171 template < class _E > class initializer_list
172 {
173 typedef size_t size_type;
174 typedef _E *iterator;
175 iterator _M_array;
176 size_type _M_len;
177 };
178 template
179 <
180 typename
181 _Key,
182 typename
183 _Tp,
184 typename
185 _Compare
186 =
187 less
188 <
189 _Key >, typename _Alloc = allocator < pair < _Key, _Tp > > >class multimap
190 {
191 typedef _Key key_type;
192 typedef pair < _Key, _Tp > value_type;
193 typedef _Compare key_compare;
194 typedef _Alloc allocator_type;
195 typedef
196 _Rb_tree
197 <
198 key_type,
199 value_type, _Select1st < value_type >, key_compare > _Rep_type;
200 _Rep_type _M_t;
201 public:
202 multimap (initializer_list < value_type >, _Compare __comp = _Compare (), allocator_type __a = allocator_type ()):
203 _M_t
204 (__comp, __a)
205 {
206 }
207 };
208 }
209
210 using namespace std;
211 void
212 test01 ()
213 {
214 typedef multimap < int, double >Container;
215 Container (
216 {
217 {
218 1}
219 }
220 );
221 }
This page took 0.052732 seconds and 5 git commands to generate.