]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/20_util/is_constructible/value-2.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / is_constructible / value-2.cc
1 // { dg-do compile { target c++11 } }
2
3 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
9 // any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
19
20 #include <type_traits>
21 #include <initializer_list>
22 #include <testsuite_tr1.h>
23
24 using namespace __gnu_test::construct;
25
26 static_assert(std::is_constructible<int, int>::value, "Error");
27 static_assert(std::is_constructible<std::nullptr_t, std::nullptr_t>::value,
28 "Error");
29 static_assert(std::is_constructible<E, E>::value, "Error");
30 static_assert(std::is_constructible<SE, SE>::value, "Error");
31 static_assert(std::is_constructible<OpE, OpE>::value, "Error");
32 static_assert(std::is_constructible<OpSE, OpSE>::value, "Error");
33 static_assert(std::is_constructible<Empty, Empty>::value, "Error");
34 static_assert(std::is_constructible<B, B>::value, "Error");
35 static_assert(std::is_constructible<U, U>::value, "Error");
36 static_assert(std::is_constructible<int B::*, int B::*>::value, "Error");
37 static_assert(std::is_constructible<Ellipsis, Ellipsis>::value, "Error");
38 static_assert(std::is_constructible<int*, int*>::value, "Error");
39 static_assert(std::is_constructible<void*, void*>::value, "Error");
40 static_assert(std::is_constructible<Any, Any>::value, "Error");
41 static_assert(std::is_constructible<nAny, nAny>::value, "Error");
42 static_assert(std::is_constructible<std::initializer_list<int>,
43 std::initializer_list<int>>::value, "Error");
44 static_assert(std::is_constructible<DelDef, DelDef>::value, "Error");
45
46 static_assert(!std::is_constructible<void, void>::value, "Error");
47 static_assert(!std::is_constructible<Abstract, Abstract>::value, "Error");
48 static_assert(!std::is_constructible<int[], int[]>::value, "Error");
49 static_assert(!std::is_constructible<int[1], int[1]>::value, "Error");
50 static_assert(!std::is_constructible<DelCopy, const DelCopy&>::value, "Error");
51 static_assert(!std::is_constructible<DelCopy, DelCopy&&>::value, "Error");
52 static_assert(!std::is_constructible<DelCopy, DelCopy>::value, "Error");
53 static_assert(!std::is_constructible<DelDtor, void>::value, "Error");
54 static_assert(!std::is_constructible<DelDtor, int>::value, "Error");
55 static_assert(!std::is_constructible<DelDtor, DelDtor>::value, "Error");
56 static_assert(!std::is_constructible<DelDtor, DelDtor&&>::value, "Error");
57 static_assert(!std::is_constructible<DelDtor, const DelDtor&>::value, "Error");
58
59 static_assert(std::is_constructible<DelEllipsis, const DelEllipsis&>::value,
60 "Error");
61 static_assert(std::is_constructible<DelEllipsis, DelEllipsis&&>::value,
62 "Error");
63 static_assert(std::is_constructible<DelEllipsis, DelEllipsis>::value, "Error");
64 static_assert(!std::is_constructible<DelEllipsis, void>::value, "Error");
65 static_assert(!std::is_constructible<DelEllipsis, std::nullptr_t>::value,
66 "Error");
67 static_assert(!std::is_constructible<DelEllipsis, B>::value, "Error");
68 static_assert(!std::is_constructible<DelEllipsis, Empty>::value, "Error");
69 static_assert(!std::is_constructible<DelEllipsis, E>::value, "Error");
70 static_assert(!std::is_constructible<DelEllipsis, SE>::value, "Error");
71 static_assert(!std::is_constructible<DelEllipsis, OpE>::value, "Error");
72 static_assert(!std::is_constructible<DelEllipsis, OpSE>::value, "Error");
73 static_assert(!std::is_constructible<DelEllipsis, void()>::value, "Error");
74 static_assert(!std::is_constructible<DelEllipsis, void() const>::value,
75 "Error");
76 static_assert(!std::is_constructible<DelEllipsis, int[1]>::value, "Error");
77 static_assert(!std::is_constructible<DelEllipsis, int[]>::value, "Error");
78 static_assert(!std::is_constructible<DelEllipsis, int*>::value, "Error");
79 static_assert(!std::is_constructible<DelEllipsis, void*>::value, "Error");
80 static_assert(!std::is_constructible<DelEllipsis, int B::*>::value, "Error");
81 static_assert(!std::is_constructible<DelEllipsis, int D::*>::value, "Error");
82 static_assert(!std::is_constructible<DelEllipsis, Abstract>::value, "Error");
83 static_assert(!std::is_constructible<int, DelImplicitTo<int>>::value, "Error");
84 static_assert(!std::is_constructible<std::nullptr_t,
85 DelImplicitTo<std::nullptr_t>>::value, "Error");
86 static_assert(!std::is_constructible<int&,
87 DelImplicitTo<const int&>>::value, "Error");
88
89 static_assert(!std::is_constructible<int, void>::value, "Error");
90 static_assert(!std::is_constructible<void, int>::value, "Error");
91 static_assert(std::is_constructible<void*, int*>::value, "Error");
92 static_assert(!std::is_constructible<int*, void*>::value, "Error");
93 static_assert(std::is_constructible<int*, std::nullptr_t>::value, "Error");
94 static_assert(!std::is_constructible<std::nullptr_t, int*>::value, "Error");
95 static_assert(!std::is_constructible<Empty, E>::value, "Error");
96 static_assert(!std::is_constructible<Empty, SE>::value, "Error");
97 static_assert(!std::is_constructible<Empty, OpE>::value, "Error");
98 static_assert(!std::is_constructible<Empty, OpSE>::value, "Error");
99 static_assert(!std::is_constructible<Empty, void>::value, "Error");
100 static_assert(!std::is_constructible<Empty, void*>::value, "Error");
101 static_assert(!std::is_constructible<Empty, std::nullptr_t>::value, "Error");
102 static_assert(!std::is_constructible<Empty, int[]>::value, "Error");
103 static_assert(!std::is_constructible<Empty, int[3]>::value, "Error");
104 static_assert(!std::is_constructible<Empty, int>::value, "Error");
105 static_assert(!std::is_constructible<Abstract, int>::value, "Error");
106 static_assert(!std::is_constructible<Abstract, std::nullptr_t>::value, "Error");
107 static_assert(!std::is_constructible<std::nullptr_t, Abstract>::value, "Error");
108 static_assert(!std::is_constructible<Abstract, int[]>::value, "Error");
109 static_assert(std::is_constructible<B, D>::value, "Error");
110 static_assert(!std::is_constructible<D, B>::value, "Error");
111 static_assert(!std::is_constructible<int[], int[1]>::value, "Error");
112 static_assert(!std::is_constructible<int[1], int[]>::value, "Error");
113 static_assert(!std::is_constructible<int[], Empty>::value, "Error");
114 static_assert(!std::is_constructible<int[], std::nullptr_t>::value, "Error");
115 static_assert(!std::is_constructible<int[1], Abstract>::value, "Error");
116
117 static_assert(std::is_constructible<const int*, int*>::value, "Error");
118 static_assert(std::is_constructible<const void*, void*>::value, "Error");
119 static_assert(std::is_constructible<const void*, int*>::value, "Error");
120 static_assert(!std::is_constructible<int*, const void*>::value, "Error");
121
122 static_assert(std::is_constructible<int, E>::value, "Error");
123 static_assert(!std::is_constructible<E, int>::value, "Error");
124 static_assert(!std::is_constructible<E, E2>::value, "Error");
125 static_assert(std::is_constructible<E, E>::value, "Error");
126 static_assert(std::is_constructible<bool, E>::value, "Error");
127 static_assert(!std::is_constructible<E, bool>::value, "Error");
128 static_assert(std::is_constructible<double, E>::value, "Error");
129 static_assert(!std::is_constructible<E, double>::value, "Error");
130 static_assert(!std::is_constructible<std::nullptr_t, E>::value, "Error");
131 static_assert(!std::is_constructible<E, std::nullptr_t>::value, "Error");
132
133 static_assert(std::is_constructible<int, OpE>::value, "Error");
134 static_assert(!std::is_constructible<OpE, int>::value, "Error");
135 static_assert(!std::is_constructible<OpE, E2>::value, "Error");
136 static_assert(std::is_constructible<OpE, OpE>::value, "Error");
137 static_assert(std::is_constructible<bool, OpE>::value, "Error");
138 static_assert(!std::is_constructible<OpE, bool>::value, "Error");
139 static_assert(std::is_constructible<double, OpE>::value, "Error");
140 static_assert(!std::is_constructible<OpE, double>::value, "Error");
141 static_assert(!std::is_constructible<std::nullptr_t, OpE>::value, "Error");
142 static_assert(!std::is_constructible<OpE, std::nullptr_t>::value, "Error");
143
144 static_assert(!std::is_constructible<int, SE>::value, "Error");
145 static_assert(!std::is_constructible<SE, int>::value, "Error");
146 static_assert(!std::is_constructible<E, SE>::value, "Error");
147 static_assert(!std::is_constructible<SE, SE2>::value, "Error");
148 static_assert(std::is_constructible<SE, SE>::value, "Error");
149 static_assert(!std::is_constructible<bool, SE>::value, "Error");
150 static_assert(!std::is_constructible<SE, bool>::value, "Error");
151 static_assert(!std::is_constructible<double, SE>::value, "Error");
152 static_assert(!std::is_constructible<SE, double>::value, "Error");
153 static_assert(!std::is_constructible<std::nullptr_t, SE>::value, "Error");
154 static_assert(!std::is_constructible<SE, std::nullptr_t>::value, "Error");
155
156 static_assert(!std::is_constructible<int, OpSE>::value, "Error");
157 static_assert(!std::is_constructible<OpSE, int>::value, "Error");
158 static_assert(!std::is_constructible<OpE, OpSE>::value, "Error");
159 static_assert(!std::is_constructible<OpSE, SE2>::value, "Error");
160 static_assert(std::is_constructible<OpSE, OpSE>::value, "Error");
161 static_assert(!std::is_constructible<bool, OpSE>::value, "Error");
162 static_assert(!std::is_constructible<OpSE, bool>::value, "Error");
163 static_assert(!std::is_constructible<double, OpSE>::value, "Error");
164 static_assert(!std::is_constructible<OpSE, double>::value, "Error");
165 static_assert(!std::is_constructible<std::nullptr_t, OpSE>::value, "Error");
166 static_assert(!std::is_constructible<OpSE, std::nullptr_t>::value, "Error");
167
168 static_assert(!std::is_constructible<D*, B*>::value, "Error");
169 static_assert(!std::is_constructible<const volatile D*, B*>::value, "Error");
170 static_assert(!std::is_constructible<D*, const volatile B*>::value, "Error");
171
172 static_assert(!std::is_constructible<D*, B* const>::value, "Error");
173 static_assert(!std::is_constructible<const volatile D*, B* const>::value,
174 "Error");
175 static_assert(!std::is_constructible<D*, const volatile B* const>::value,
176 "Error");
177
178 static_assert(!std::is_constructible<D*, B*&>::value, "Error");
179 static_assert(!std::is_constructible<const volatile D*, B*&>::value, "Error");
180 static_assert(!std::is_constructible<D*, const volatile B*&>::value, "Error");
181
182 static_assert(!std::is_constructible<int B::*, int D::*>::value, "Error");
183 static_assert(!std::is_constructible<const volatile int B::*, int D::*>::value,
184 "Error");
185 static_assert(!std::is_constructible<int B::*, const volatile int D::*>::value,
186 "Error");
187
188 static_assert(!std::is_constructible<int B::*, int D::* const>::value, "Error");
189 static_assert(!std::is_constructible<const volatile int B::*,
190 int D::* const>::value, "Error");
191 static_assert(!std::is_constructible<int B::*,
192 const volatile int D::* const>::value, "Error");
193
194 static_assert(!std::is_constructible<int B::*, int D::*&>::value, "Error");
195 static_assert(!std::is_constructible<const volatile int B::*,
196 int D::*&>::value, "Error");
197 static_assert(!std::is_constructible<int B::*,
198 const volatile int D::*&>::value, "Error");
199
200 static_assert(!std::is_constructible<int B::*, int D::* const &>::value,
201 "Error");
202 static_assert(!std::is_constructible<const volatile int B::*,
203 int D::* const &>::value, "Error");
204 static_assert(!std::is_constructible<int B::*,
205 const volatile int D::* const &>::value, "Error");
206
207 static_assert(!std::is_constructible<int&&, int&>::value, "Error");
208 static_assert(!std::is_constructible<const int&&, int&>::value, "Error");
209
210 static_assert(std::is_constructible<B&, D&>::value, "Error");
211 static_assert(std::is_constructible<B&&, D&&>::value, "Error");
212 static_assert(std::is_constructible<const B&, D&>::value, "Error");
213 static_assert(std::is_constructible<const B&&, D&&>::value, "Error");
214 static_assert(!std::is_constructible<B&, const D&>::value, "Error");
215 static_assert(!std::is_constructible<B&&, const D&&>::value, "Error");
216
217 static_assert(!std::is_constructible<D&, B&>::value, "Error");
218 static_assert(!std::is_constructible<D&&, B&&>::value, "Error");
219 static_assert(!std::is_constructible<D&, const B&>::value, "Error");
220 static_assert(!std::is_constructible<D&&, const B&&>::value, "Error");
221 static_assert(!std::is_constructible<const D&, B&>::value, "Error");
222 static_assert(!std::is_constructible<const D&&, B&&>::value, "Error");
223
224 static_assert(!std::is_constructible<B&&, B&>::value, "Error");
225 static_assert(!std::is_constructible<B&&, D&>::value, "Error");
226 static_assert(std::is_constructible<B&&, ImplicitTo<D&&>>::value, "Error");
227 static_assert(std::is_constructible<B&&, ImplicitTo<D&&>&>::value, "Error");
228 static_assert(std::is_constructible<int&&, double&>::value, "Error");
229 static_assert(std::is_constructible<const int&,
230 ImplicitTo<int&>&>::value, "Error");
231 static_assert(std::is_constructible<const int&,
232 ImplicitTo<int&>>::value, "Error");
233 static_assert(std::is_constructible<const int&,
234 ExplicitTo<int&>&>::value, "Error");
235 static_assert(std::is_constructible<const int&,
236 ExplicitTo<int&>>::value, "Error");
237
238 static_assert(!std::is_constructible<B&&, ExplicitTo<D&&>>::value, "Error");
239 static_assert(!std::is_constructible<B&&, ExplicitTo<D&&>&>::value, "Error");
240
241 static_assert(!std::is_constructible<B&, B&&>::value, "Error");
242 static_assert(!std::is_constructible<D&, B&&>::value, "Error");
243 static_assert(!std::is_constructible<B&, D&&>::value, "Error");
244
245 static_assert(std::is_constructible<void(&)(), void(&)()>::value, "Error");
246 static_assert(std::is_constructible<void(&&)(), void(&&)()>::value, "Error");
247 static_assert(std::is_constructible<void(&&)(), void()>::value, "Error");
248
249 static_assert(!std::is_constructible<void>::value, "Error" );
250 static_assert(!std::is_constructible<void, int>::value, "Error" );
251 static_assert(!std::is_constructible<void, int, double>::value, "Error" );
252
253 static_assert(!std::is_constructible<int&>::value, "Error" );
254 static_assert(!std::is_constructible<const int&>::value, "Error" );
255 static_assert(!std::is_constructible<int&, int, int>::value, "Error" );
256 static_assert(!std::is_constructible<const int&, int, int>::value, "Error" );
257
258 static_assert(std::is_constructible<void(&)(), void()>::value, "Error");
259 static_assert(std::is_constructible<void(&)(), void(&&)()>::value, "Error");
260
261 static_assert(std::is_constructible<int&, int&>::value, "Error");
262 static_assert(!std::is_constructible<int&, const int&>::value, "Error");
263 static_assert(!std::is_constructible<int&, int>::value, "Error");
264 static_assert(!std::is_constructible<int&, int&&>::value, "Error");
265 static_assert(!std::is_constructible<int&, const int&&>::value, "Error");
266 static_assert(std::is_constructible<const int&, int&>::value, "Error");
267 static_assert(std::is_constructible<const int&, int>::value, "Error");
268 static_assert(std::is_constructible<const int&, const int>::value, "Error");
269 static_assert(std::is_constructible<const int&, int&&>::value, "Error");
270 static_assert(std::is_constructible<const int&, const int&&>::value, "Error");
271 static_assert(std::is_constructible<volatile int&, int&>::value, "Error");
272 static_assert(!std::is_constructible<volatile int&, const int&>::value,
273 "Error");
274 static_assert(!std::is_constructible<volatile int&, int>::value, "Error");
275 static_assert(!std::is_constructible<volatile int&, int&&>::value, "Error");
276 static_assert(!std::is_constructible<volatile int&, const int&&>::value,
277 "Error");
278 static_assert(std::is_constructible<const volatile int&, int&>::value, "Error");
279 static_assert(!std::is_constructible<const volatile int&, int>::value, "Error");
280 static_assert(!std::is_constructible<const volatile int&, const int>::value,
281 "Error");
282 static_assert(!std::is_constructible<const volatile int&, int&&>::value,
283 "Error");
284 static_assert(!std::is_constructible<const volatile int&, const int&&>::value,
285 "Error");
286
287 static_assert(std::is_constructible<int&&, int>::value, "Error");
288 static_assert(std::is_constructible<int&&, int&&>::value, "Error");
289 static_assert(!std::is_constructible<int&&, const int&&>::value, "Error");
290 static_assert(!std::is_constructible<int&&, int&>::value, "Error");
291 static_assert(!std::is_constructible<int&&, const int&>::value, "Error");
292 static_assert(std::is_constructible<int&&, double&>::value, "Error");
293 static_assert(std::is_constructible<const int&&, int>::value, "Error");
294 static_assert(std::is_constructible<const int&&, int&&>::value, "Error");
295 static_assert(std::is_constructible<const int&&, const int>::value, "Error");
296 static_assert(std::is_constructible<const int&&, const int&&>::value, "Error");
297 static_assert(!std::is_constructible<int&&, const int&>::value, "Error");
298 static_assert(!std::is_constructible<const int&&, int&>::value, "Error");
299 static_assert(!std::is_constructible<const int&&, const int&>::value, "Error");
300 static_assert(std::is_constructible<volatile int&&, int>::value, "Error");
301 static_assert(std::is_constructible<volatile int&&, int&&>::value, "Error");
302 static_assert(!std::is_constructible<volatile int&&, const int&&>::value,
303 "Error");
304 static_assert(!std::is_constructible<volatile int&&, int&>::value, "Error");
305 static_assert(!std::is_constructible<volatile int&&, const int&>::value,
306 "Error");
307 static_assert(std::is_constructible<volatile int&&, double&>::value, "Error");
308 static_assert(std::is_constructible<volatile const int&&, int>::value, "Error");
309 static_assert(std::is_constructible<const volatile int&&, int&&>::value,
310 "Error");
311 static_assert(std::is_constructible<const volatile int&&, const int>::value,
312 "Error");
313 static_assert(std::is_constructible<const volatile int&&, const int&&>::value,
314 "Error");
315 static_assert(!std::is_constructible<volatile int&&, const int&>::value,
316 "Error");
317 static_assert(!std::is_constructible<const volatile int&&, int&>::value,
318 "Error");
319 static_assert(!std::is_constructible<const volatile int&&,
320 const int&>::value, "Error");
321
322 static_assert(std::is_constructible<Empty&, Empty&>::value, "Error");
323 static_assert(!std::is_constructible<Empty&, const Empty&>::value, "Error");
324 static_assert(!std::is_constructible<Empty&, Empty>::value, "Error");
325 static_assert(!std::is_constructible<Empty&, Empty&&>::value, "Error");
326 static_assert(!std::is_constructible<Empty&, const Empty&&>::value, "Error");
327 static_assert(std::is_constructible<const Empty&, Empty&>::value, "Error");
328 static_assert(std::is_constructible<const Empty&, Empty>::value, "Error");
329 static_assert(std::is_constructible<const Empty&, const Empty>::value, "Error");
330 static_assert(std::is_constructible<const Empty&, Empty&&>::value, "Error");
331 static_assert(std::is_constructible<const Empty&, const Empty&&>::value,
332 "Error");
333 static_assert(std::is_constructible<volatile Empty&, Empty&>::value, "Error");
334 static_assert(!std::is_constructible<volatile Empty&, const Empty&>::value,
335 "Error");
336 static_assert(!std::is_constructible<volatile Empty&, Empty>::value, "Error");
337 static_assert(!std::is_constructible<volatile Empty&, Empty&&>::value, "Error");
338 static_assert(!std::is_constructible<volatile Empty&, const Empty&&>::value,
339 "Error");
340 static_assert(std::is_constructible<const volatile Empty&, Empty&>::value,
341 "Error");
342 static_assert(!std::is_constructible<const volatile Empty&, Empty>::value,
343 "Error");
344 static_assert(!std::is_constructible<const volatile Empty&,
345 const Empty>::value, "Error");
346 static_assert(!std::is_constructible<const volatile Empty&,
347 Empty&&>::value, "Error");
348 static_assert(!std::is_constructible<const volatile Empty&,
349 const Empty&&>::value, "Error");
350
351 static_assert(std::is_constructible<Empty&&, Empty>::value, "Error");
352 static_assert(std::is_constructible<Empty&&, Empty&&>::value, "Error");
353 static_assert(!std::is_constructible<Empty&&, const Empty&&>::value, "Error");
354 static_assert(!std::is_constructible<Empty&&, Empty&>::value, "Error");
355 static_assert(!std::is_constructible<Empty&&, const Empty&>::value, "Error");
356 static_assert(!std::is_constructible<Empty&&, double&>::value, "Error");
357 static_assert(!std::is_constructible<Empty&&, const double&>::value, "Error");
358 static_assert(std::is_constructible<const Empty&&, Empty>::value, "Error");
359 static_assert(std::is_constructible<const Empty&&, Empty&&>::value, "Error");
360 static_assert(std::is_constructible<const Empty&&, const Empty>::value,
361 "Error");
362 static_assert(std::is_constructible<const Empty&&, const Empty&&>::value,
363 "Error");
364 static_assert(!std::is_constructible<Empty&&, const Empty&>::value, "Error");
365 static_assert(!std::is_constructible<const Empty&&, Empty&>::value, "Error");
366 static_assert(!std::is_constructible<const Empty&&, const Empty&>::value,
367 "Error");
368 static_assert(std::is_constructible<volatile Empty&&, Empty>::value, "Error");
369 static_assert(std::is_constructible<volatile Empty&&, Empty&&>::value, "Error");
370 static_assert(!std::is_constructible<volatile Empty&&, const Empty&&>::value,
371 "Error");
372 static_assert(!std::is_constructible<volatile Empty&&, Empty&>::value, "Error");
373 static_assert(!std::is_constructible<volatile Empty&&, const Empty&>::value,
374 "Error");
375 static_assert(!std::is_constructible<volatile Empty&&, double&>::value,
376 "Error");
377 static_assert(!std::is_constructible<volatile Empty&&, const double&>::value,
378 "Error");
379 static_assert(std::is_constructible<const volatile Empty&&, Empty>::value,
380 "Error");
381 static_assert(std::is_constructible<const volatile Empty&&, Empty&&>::value,
382 "Error");
383 static_assert(std::is_constructible<const volatile Empty&&,
384 const Empty>::value, "Error");
385 static_assert(std::is_constructible<const volatile Empty&&,
386 const Empty&&>::value, "Error");
387 static_assert(!std::is_constructible<volatile Empty&&,
388 const Empty&>::value, "Error");
389 static_assert(!std::is_constructible<const volatile Empty&&,
390 Empty&>::value, "Error");
391 static_assert(!std::is_constructible<const volatile Empty&&,
392 const Empty&>::value, "Error");
393
394 static_assert(std::is_constructible<Ellipsis, int>::value, "Error");
395 static_assert(std::is_constructible<Ellipsis, Empty>::value, "Error");
396 static_assert(std::is_constructible<Ellipsis, std::nullptr_t>::value, "Error");
397 static_assert(std::is_constructible<Ellipsis, int[]>::value, "Error");
398 static_assert(std::is_constructible<Ellipsis, int[1]>::value, "Error");
399 static_assert(!std::is_constructible<Ellipsis, void>::value, "Error");
400
401 static_assert(std::is_constructible<int(&)[1], int(&)[1]>::value, "Error");
402 static_assert(std::is_constructible<const int(&)[1],
403 int(&)[1]>::value, "Error");
404 static_assert(std::is_constructible<volatile int(&)[1],
405 int(&)[1]>::value, "Error");
406 static_assert(std::is_constructible<const volatile int(&)[1],
407 int(&)[1]>::value, "Error");
408 static_assert(!std::is_constructible<int(&)[1],
409 const int(&)[1]>::value, "Error");
410 static_assert(!std::is_constructible<const int(&)[1],
411 volatile int(&)[1]>::value, "Error");
412
413 static_assert(std::is_constructible<int(&)[], int(&)[]>::value, "Error");
414
415 static_assert(!std::is_constructible<int(&)[1], int(&)[2]>::value, "Error");
416 static_assert(!std::is_constructible<int(&)[1], int&>::value, "Error");
417 static_assert(!std::is_constructible<int&, int(&)[1]>::value, "Error");
418
419 static_assert(!std::is_constructible<U, int>::value, "Error");
420 static_assert(!std::is_constructible<U, Empty>::value, "Error");
421
422 static_assert(!std::is_constructible<void(), void()>::value, "Error");
423 static_assert(!std::is_constructible<void(), int>::value, "Error");
424 static_assert(!std::is_constructible<void(), Abstract>::value, "Error");
425 static_assert(!std::is_constructible<void(), std::nullptr_t>::value, "Error");
426 static_assert(!std::is_constructible<void(), Empty>::value, "Error");
427 static_assert(!std::is_constructible<void(), U>::value, "Error");
428 static_assert(!std::is_constructible<void(), E>::value, "Error");
429 static_assert(!std::is_constructible<void(), SE>::value, "Error");
430 static_assert(!std::is_constructible<void(), OpE>::value, "Error");
431 static_assert(!std::is_constructible<void(), OpSE>::value, "Error");
432 static_assert(!std::is_constructible<void(), int[]>::value, "Error");
433 static_assert(!std::is_constructible<void(), int[1]>::value, "Error");
434
435 static_assert(!std::is_constructible<void() const,
436 void() volatile>::value, "Error");
437 static_assert(!std::is_constructible<void() const, int>::value, "Error");
438 static_assert(!std::is_constructible<void() const, Abstract>::value, "Error");
439 static_assert(!std::is_constructible<void() const, std::nullptr_t>::value,
440 "Error");
441 static_assert(!std::is_constructible<void() const, Empty>::value, "Error");
442 static_assert(!std::is_constructible<void() const, U>::value, "Error");
443 static_assert(!std::is_constructible<void() const, E>::value, "Error");
444 static_assert(!std::is_constructible<void() const, SE>::value, "Error");
445 static_assert(!std::is_constructible<void() const, OpE>::value, "Error");
446 static_assert(!std::is_constructible<void() const, OpSE>::value, "Error");
447 static_assert(!std::is_constructible<void() const, int[]>::value, "Error");
448 static_assert(!std::is_constructible<void() const, int[1]>::value, "Error");
449
450 static_assert(!std::is_constructible<void(int), void()>::value, "Error");
451 static_assert(!std::is_constructible<int, void()>::value, "Error");
452 static_assert(!std::is_constructible<Abstract, void()>::value, "Error");
453 static_assert(!std::is_constructible<std::nullptr_t, void()>::value, "Error");
454 static_assert(!std::is_constructible<Empty, void()>::value, "Error");
455 static_assert(!std::is_constructible<U, void()>::value, "Error");
456 static_assert(!std::is_constructible<E, void()>::value, "Error");
457 static_assert(!std::is_constructible<SE, void()>::value, "Error");
458 static_assert(!std::is_constructible<OpE, void()>::value, "Error");
459 static_assert(!std::is_constructible<OpSE, void()>::value, "Error");
460 static_assert(!std::is_constructible<int[], void()>::value, "Error");
461 static_assert(!std::is_constructible<int[1], void()>::value, "Error");
462
463 static_assert(!std::is_constructible<void(int) const,
464 void() const>::value, "Error");
465 static_assert(!std::is_constructible<int, void() const>::value, "Error");
466 static_assert(!std::is_constructible<Abstract, void() const>::value, "Error");
467 static_assert(!std::is_constructible<std::nullptr_t, void() const>::value,
468 "Error");
469 static_assert(!std::is_constructible<Empty, void() const>::value, "Error");
470 static_assert(!std::is_constructible<U, void() const>::value, "Error");
471 static_assert(!std::is_constructible<E, void() const>::value, "Error");
472 static_assert(!std::is_constructible<SE, void() const>::value, "Error");
473 static_assert(!std::is_constructible<OpE, void() const>::value, "Error");
474 static_assert(!std::is_constructible<OpSE, void() const>::value, "Error");
475 static_assert(!std::is_constructible<int[], void() const>::value, "Error");
476 static_assert(!std::is_constructible<int[1], void() const>::value, "Error");
477
478 static_assert(!std::is_constructible<void, int, int>::value, "Error");
479 static_assert(!std::is_constructible<void, Empty, B>::value, "Error");
480 static_assert(!std::is_constructible<void, Empty, Empty>::value, "Error");
481 static_assert(!std::is_constructible<void, U, Empty>::value, "Error");
482 static_assert(!std::is_constructible<void, U, U>::value, "Error");
483 static_assert(!std::is_constructible<void, std::nullptr_t,
484 std::nullptr_t>::value, "Error");
485 static_assert(!std::is_constructible<void, int[1], int[1]>::value, "Error");
486 static_assert(!std::is_constructible<void, int[], int[]>::value, "Error");
487 static_assert(!std::is_constructible<void, void, int>::value, "Error");
488 static_assert(!std::is_constructible<void, void, void>::value, "Error");
489 static_assert(!std::is_constructible<void, void(), void()>::value, "Error");
490 static_assert(!std::is_constructible<void, void() const,
491 void() volatile>::value, "Error");
492
493 static_assert(!std::is_constructible<int, int, int>::value, "Error");
494 static_assert(!std::is_constructible<const int, int, int>::value, "Error");
495 static_assert(!std::is_constructible<int, void, int>::value, "Error");
496 static_assert(!std::is_constructible<const int, void, int>::value, "Error");
497 static_assert(!std::is_constructible<int, void, void>::value, "Error");
498 static_assert(!std::is_constructible<const int, void, void>::value, "Error");
499 static_assert(!std::is_constructible<bool, int, int>::value, "Error");
500 static_assert(!std::is_constructible<const bool, int, int>::value, "Error");
501 static_assert(!std::is_constructible<std::nullptr_t, int, int>::value, "Error");
502 static_assert(!std::is_constructible<const std::nullptr_t, int, int>::value,
503 "Error");
504 static_assert(!std::is_constructible<std::nullptr_t, void, int>::value,
505 "Error");
506 static_assert(!std::is_constructible<const std::nullptr_t, void, int>::value,
507 "Error");
508 static_assert(!std::is_constructible<std::nullptr_t, void, void>::value,
509 "Error");
510 static_assert(!std::is_constructible<const std::nullptr_t, void, void>::value,
511 "Error");
512 static_assert(!std::is_constructible<E, int, int>::value, "Error");
513 static_assert(!std::is_constructible<const E, int, int>::value, "Error");
514 static_assert(!std::is_constructible<E, void, int>::value, "Error");
515 static_assert(!std::is_constructible<const E, void, int>::value, "Error");
516 static_assert(!std::is_constructible<E, void, void>::value, "Error");
517 static_assert(!std::is_constructible<const E, void, void>::value, "Error");
518 static_assert(!std::is_constructible<SE, int, int>::value, "Error");
519 static_assert(!std::is_constructible<const SE, int, int>::value, "Error");
520 static_assert(!std::is_constructible<SE, void, int>::value, "Error");
521 static_assert(!std::is_constructible<const SE, void, int>::value, "Error");
522 static_assert(!std::is_constructible<SE, void, void>::value, "Error");
523 static_assert(!std::is_constructible<const SE, void, void>::value, "Error");
524 static_assert(!std::is_constructible<OpE, int, int>::value, "Error");
525 static_assert(!std::is_constructible<const OpE, int, int>::value, "Error");
526 static_assert(!std::is_constructible<OpE, void, int>::value, "Error");
527 static_assert(!std::is_constructible<const OpE, void, int>::value, "Error");
528 static_assert(!std::is_constructible<OpE, void, void>::value, "Error");
529 static_assert(!std::is_constructible<const OpE, void, void>::value, "Error");
530 static_assert(!std::is_constructible<OpSE, int, int>::value, "Error");
531 static_assert(!std::is_constructible<const OpSE, int, int>::value, "Error");
532 static_assert(!std::is_constructible<OpSE, void, int>::value, "Error");
533 static_assert(!std::is_constructible<const OpSE, void, int>::value, "Error");
534 static_assert(!std::is_constructible<OpSE, void, void>::value, "Error");
535 static_assert(!std::is_constructible<const OpSE, void, void>::value, "Error");
536 static_assert(!std::is_constructible<Empty, int, int>::value, "Error");
537 static_assert(!std::is_constructible<const Empty, int, int>::value, "Error");
538 static_assert(!std::is_constructible<Empty, void, int>::value, "Error");
539 static_assert(!std::is_constructible<const Empty, void, int>::value, "Error");
540 static_assert(!std::is_constructible<Empty, void, void>::value, "Error");
541 static_assert(!std::is_constructible<const Empty, void, void>::value, "Error");
542 static_assert(!std::is_constructible<U, int, int>::value, "Error");
543 static_assert(!std::is_constructible<const U, int, int>::value, "Error");
544 static_assert(!std::is_constructible<U, void, int>::value, "Error");
545 static_assert(!std::is_constructible<const U, void, int>::value, "Error");
546 static_assert(!std::is_constructible<U, void, void>::value, "Error");
547 static_assert(!std::is_constructible<const U, void, void>::value, "Error");
548 static_assert(!std::is_constructible<B, int, int>::value, "Error");
549 static_assert(!std::is_constructible<const B, int, int>::value, "Error");
550 static_assert(!std::is_constructible<B, void, int>::value, "Error");
551 static_assert(!std::is_constructible<const B, void, int>::value, "Error");
552 static_assert(!std::is_constructible<B, void, void>::value, "Error");
553 static_assert(!std::is_constructible<const B, void, void>::value, "Error");
554 static_assert(!std::is_constructible<Any, int, int>::value, "Error");
555 static_assert(!std::is_constructible<const Any, int, int>::value, "Error");
556 static_assert(!std::is_constructible<Any, void, int>::value, "Error");
557 static_assert(!std::is_constructible<const Any, void, int>::value, "Error");
558 static_assert(!std::is_constructible<Any, void, void>::value, "Error");
559 static_assert(!std::is_constructible<const Any, void, void>::value, "Error");
560 static_assert(!std::is_constructible<nAny, void, int>::value, "Error");
561 static_assert(!std::is_constructible<const nAny, void, int>::value, "Error");
562 static_assert(!std::is_constructible<nAny, void, void>::value, "Error");
563 static_assert(!std::is_constructible<const nAny, void, void>::value, "Error");
564 static_assert(!std::is_constructible<FromArgs<>, int, int>::value, "Error");
565 static_assert(!std::is_constructible<const FromArgs<>, int, int>::value,
566 "Error");
567 static_assert(!std::is_constructible<FromArgs<>, void, int>::value, "Error");
568 static_assert(!std::is_constructible<const FromArgs<>, void, int>::value,
569 "Error");
570 static_assert(!std::is_constructible<FromArgs<>, void, void>::value, "Error");
571 static_assert(!std::is_constructible<const FromArgs<>, void, void>::value,
572 "Error");
573 static_assert(!std::is_constructible<Abstract, int, int>::value, "Error");
574 static_assert(!std::is_constructible<const Abstract, int, int>::value, "Error");
575 static_assert(!std::is_constructible<Abstract, void, int>::value, "Error");
576 static_assert(!std::is_constructible<const Abstract, void, int>::value,
577 "Error");
578 static_assert(!std::is_constructible<Abstract, void, void>::value, "Error");
579 static_assert(!std::is_constructible<const Abstract, void, void>::value,
580 "Error");
581 static_assert(!std::is_constructible<AbstractDelDtor, int, int>::value,
582 "Error");
583 static_assert(!std::is_constructible<const AbstractDelDtor, int, int>::value,
584 "Error");
585 static_assert(!std::is_constructible<AbstractDelDtor, void, int>::value,
586 "Error");
587 static_assert(!std::is_constructible<const AbstractDelDtor, void, int>::value,
588 "Error");
589 static_assert(!std::is_constructible<AbstractDelDtor, void, void>::value,
590 "Error");
591 static_assert(!std::is_constructible<const AbstractDelDtor, void, void>::value,
592 "Error");
593 static_assert(!std::is_constructible<int[1], int, int>::value, "Error");
594 static_assert(!std::is_constructible<const int[1], int, int>::value, "Error");
595 static_assert(!std::is_constructible<int[1], void, int>::value, "Error");
596 static_assert(!std::is_constructible<const int[1], void, int>::value, "Error");
597 static_assert(!std::is_constructible<int[1], void, void>::value, "Error");
598 static_assert(!std::is_constructible<const int[1], void, void>::value, "Error");
599 static_assert(!std::is_constructible<int&, int, int>::value, "Error");
600 static_assert(!std::is_constructible<int&, void, int>::value, "Error");
601 static_assert(!std::is_constructible<int&, void, void>::value, "Error");
602 static_assert(!std::is_constructible<int&, int&, int&>::value, "Error");
603 static_assert(!std::is_constructible<int&, void, int&>::value, "Error");
604 static_assert(!std::is_constructible<int&, void, void>::value, "Error");
605 static_assert(!std::is_constructible<std::nullptr_t&, int, int>::value,
606 "Error");
607 static_assert(!std::is_constructible<std::nullptr_t&, void, int>::value,
608 "Error");
609 static_assert(!std::is_constructible<std::nullptr_t&, void, void>::value,
610 "Error");
611 static_assert(!std::is_constructible<E&, int, int>::value, "Error");
612 static_assert(!std::is_constructible<E&, void, int>::value, "Error");
613 static_assert(!std::is_constructible<E&, void, void>::value, "Error");
614 static_assert(!std::is_constructible<SE&, int, int>::value, "Error");
615 static_assert(!std::is_constructible<SE&, void, int>::value, "Error");
616 static_assert(!std::is_constructible<SE&, void, void>::value, "Error");
617 static_assert(!std::is_constructible<OpE&, int, int>::value, "Error");
618 static_assert(!std::is_constructible<OpE&, void, int>::value, "Error");
619 static_assert(!std::is_constructible<OpE&, void, void>::value, "Error");
620 static_assert(!std::is_constructible<OpSE&, int, int>::value, "Error");
621 static_assert(!std::is_constructible<OpSE&, void, int>::value, "Error");
622 static_assert(!std::is_constructible<OpSE&, void, void>::value, "Error");
623 static_assert(!std::is_constructible<Empty&, int, int>::value, "Error");
624 static_assert(!std::is_constructible<Empty&, void, int>::value, "Error");
625 static_assert(!std::is_constructible<Empty&, void, void>::value, "Error");
626 static_assert(!std::is_constructible<U&, int, int>::value, "Error");
627 static_assert(!std::is_constructible<U&, void, int>::value, "Error");
628 static_assert(!std::is_constructible<U&, void, void>::value, "Error");
629 static_assert(!std::is_constructible<B&, int, int>::value, "Error");
630 static_assert(!std::is_constructible<B&, void, int>::value, "Error");
631 static_assert(!std::is_constructible<B&, void, void>::value, "Error");
632 static_assert(!std::is_constructible<Any&, int, int>::value, "Error");
633 static_assert(!std::is_constructible<Any&, void, int>::value, "Error");
634 static_assert(!std::is_constructible<Any&, void, void>::value, "Error");
635 static_assert(!std::is_constructible<nAny&, void, int>::value, "Error");
636 static_assert(!std::is_constructible<nAny&, void, void>::value, "Error");
637 static_assert(!std::is_constructible<FromArgs<>&, int, int>::value, "Error");
638 static_assert(!std::is_constructible<FromArgs<>&, void, int>::value, "Error");
639 static_assert(!std::is_constructible<FromArgs<>&, void, void>::value, "Error");
640 static_assert(!std::is_constructible<Abstract&, int, int>::value, "Error");
641 static_assert(!std::is_constructible<Abstract&, void, int>::value, "Error");
642 static_assert(!std::is_constructible<Abstract&, void, void>::value, "Error");
643 static_assert(!std::is_constructible<int(&)[1], int, int>::value, "Error");
644 static_assert(!std::is_constructible<int(&)[1], void, int>::value, "Error");
645 static_assert(!std::is_constructible<int(&)[1], void, void>::value, "Error");
646
647 static_assert(!std::is_constructible<void(), int, int>::value, "Error");
648 static_assert(!std::is_constructible<void(), void, int>::value, "Error");
649 static_assert(!std::is_constructible<void(), void, void>::value, "Error");
650 static_assert(!std::is_constructible<void(), void(), int>::value, "Error");
651 static_assert(!std::is_constructible<void(), void(), void()>::value, "Error");
652
653 static_assert(!std::is_constructible<void() const, int, int>::value, "Error");
654 static_assert(!std::is_constructible<void() const, void, int>::value, "Error");
655 static_assert(!std::is_constructible<void() const, void, void>::value, "Error");
656 static_assert(!std::is_constructible<void() const, void() volatile,
657 int>::value, "Error");
658 static_assert(!std::is_constructible<void() const, void() volatile const,
659 void() const>::value, "Error");
660
661 static_assert(!std::is_constructible<FromArgs<int>, int, int>::value, "Error");
662 static_assert(!std::is_constructible<const FromArgs<int>, int, int>::value,
663 "Error");
664 static_assert(!std::is_constructible<FromArgs<int>, void, int>::value, "Error");
665 static_assert(!std::is_constructible<const FromArgs<int>, void, int>::value,
666 "Error");
667 static_assert(!std::is_constructible<FromArgs<int, int>, void, int>::value,
668 "Error");
669 static_assert(!std::is_constructible<const FromArgs<int, int>, void,
670 int>::value, "Error");
671
672 static_assert(!std::is_constructible<DelDtor, int, B, U>::value, "Error");
673 static_assert(!std::is_constructible<const DelDtor, int, B, U>::value, "Error");
674 static_assert(!std::is_constructible<DelDtor, int>::value, "Error");
675 static_assert(!std::is_constructible<const DelDtor, int>::value, "Error");
676 static_assert(!std::is_constructible<DelDtor>::value, "Error");
677 static_assert(!std::is_constructible<const DelDtor>::value, "Error");
678 static_assert(!std::is_constructible<DelDtor, void*, void(&)()>::value,
679 "Error");
680 static_assert(!std::is_constructible<const DelDtor, void*, void(&)()>::value,
681 "Error");
682
683 static_assert(!std::is_constructible<AbstractDelDtor>::value, "Error");
684 static_assert(!std::is_constructible<const AbstractDelDtor>::value, "Error");
685 static_assert(!std::is_constructible<DelEllipsis>::value, "Error");
686 static_assert(!std::is_constructible<const DelEllipsis>::value, "Error");
687 static_assert(!std::is_constructible<DelEllipsis, double>::value, "Error");
688 static_assert(!std::is_constructible<const DelEllipsis, double>::value,
689 "Error");
690 static_assert(!std::is_constructible<DelEllipsis, double, int&>::value,
691 "Error");
692 static_assert(!std::is_constructible<const DelEllipsis, double, int&>::value,
693 "Error");
694 static_assert(!std::is_constructible<DelnAny>::value, "Error");
695 static_assert(!std::is_constructible<const DelnAny>::value, "Error");
696 static_assert(!std::is_constructible<DelnAny, int>::value, "Error");
697 static_assert(!std::is_constructible<const DelnAny, int>::value, "Error");
698 static_assert(!std::is_constructible<DelnAny, int, void*>::value, "Error");
699 static_assert(!std::is_constructible<const DelnAny, int, void*>::value,
700 "Error");
701 static_assert(!std::is_constructible<DelnAny, Empty, B, D>::value, "Error");
702 static_assert(!std::is_constructible<const DelnAny, Empty, B, D>::value,
703 "Error");
704
705 // Deleted members in unions with non-trivial members:
706 static_assert(!std::is_constructible<NontrivialUnion>::value, "Error");
707 static_assert(!std::is_constructible<NontrivialUnion,
708 const NontrivialUnion&>::value, "Error");
709
710 // Unusual copy:
711 static_assert(!std::is_constructible<UnusualCopy>::value, "Error");
712 static_assert(!std::is_constructible<UnusualCopy, UnusualCopy>::value, "Error");
713 static_assert(!std::is_constructible<UnusualCopy,
714 UnusualCopy&&>::value, "Error");
715 static_assert(!std::is_constructible<UnusualCopy,
716 const UnusualCopy&>::value, "Error");
717 static_assert(std::is_constructible<UnusualCopy, UnusualCopy&>::value, "Error");
718
719 static_assert(std::is_constructible<FromArgs<int, char>,
720 int, char>::value, "Error");
721 static_assert(std::is_constructible<const FromArgs<int, char>,
722 int, char>::value, "Error");
723 static_assert(std::is_constructible<FromArgs<int, char>,
724 int, int>::value, "Error");
725 static_assert(std::is_constructible<const FromArgs<int, char>,
726 int, int>::value, "Error");
727 static_assert(std::is_constructible<nAny, int, int>::value, "Error");
728 static_assert(std::is_constructible<const nAny, int, int>::value, "Error");
729 static_assert(std::is_constructible<FromArgs<int, char>,
730 ImplicitTo<int>, ImplicitTo<char>>::value, "Error");
731 static_assert(std::is_constructible<const FromArgs<int, char>,
732 ImplicitTo<int>, ImplicitTo<char>>::value, "Error");
733 static_assert(std::is_constructible<Ellipsis, int, char>::value, "Error");
734 static_assert(std::is_constructible<const Ellipsis, int, char>::value, "Error");
735 static_assert(std::is_constructible<Ellipsis, B, U, int&>::value, "Error");
736 static_assert(std::is_constructible<const Ellipsis,
737 B, U, int&>::value, "Error");
738 static_assert(std::is_constructible<nAny, B, U, int&>::value, "Error");
739 static_assert(std::is_constructible<const nAny, B, U, int&>::value, "Error");
740 static_assert(std::is_constructible<FromArgs<std::initializer_list<int>,
741 std::initializer_list<B>>, std::initializer_list<int>,
742 std::initializer_list<B>>::value, "Error");
743 static_assert(std::is_constructible<const FromArgs<std::initializer_list<int>,
744 std::initializer_list<B>>, std::initializer_list<int>,
745 std::initializer_list<B>>::value, "Error");
746 static_assert(std::is_constructible<FromArgs<std::initializer_list<int>,
747 std::initializer_list<B>>, std::initializer_list<int>&,
748 std::initializer_list<B>&>::value, "Error");
749 static_assert(!std::is_constructible<FromArgs<std::initializer_list<int>&,
750 std::initializer_list<B>&>, std::initializer_list<int>,
751 std::initializer_list<B>>::value, "Error");
752
753 static_assert(!std::is_constructible<FromArgs<std::initializer_list<int>>,
754 int, int>::value, "Error");
755 static_assert(!std::is_constructible<const
756 FromArgs<std::initializer_list<int>>, int, int>::value, "Error");
757 static_assert(!std::is_constructible<B[2], B, B>::value, "Error");
758 static_assert(!std::is_constructible<const B[2], B, B>::value, "Error");
759 static_assert(!std::is_constructible<U[2], U, U>::value, "Error");
760 static_assert(!std::is_constructible<const U[2], U, U>::value, "Error");
761
762 static_assert(!std::is_constructible<E, E, E>::value, "Error");
763 static_assert(!std::is_constructible<const E, E, E>::value, "Error");
764 static_assert(!std::is_constructible<SE, SE, SE>::value, "Error");
765 static_assert(!std::is_constructible<const SE, SE, SE>::value, "Error");
766 static_assert(!std::is_constructible<E, B, std::nullptr_t>::value, "Error");
767 static_assert(!std::is_constructible<const E, B, std::nullptr_t>::value,
768 "Error");
769 static_assert(!std::is_constructible<SE, B, std::nullptr_t>::value, "Error");
770 static_assert(!std::is_constructible<const SE, B, std::nullptr_t>::value,
771 "Error");
772 static_assert(!std::is_constructible<E, int[], int[]>::value, "Error");
773 static_assert(!std::is_constructible<const E, int[], int[]>::value, "Error");
774 static_assert(!std::is_constructible<SE, int[], int[]>::value, "Error");
775 static_assert(!std::is_constructible<const SE, int[], int[]>::value, "Error");
776
777 static_assert(!std::is_constructible<OpE, OpE, OpE>::value, "Error");
778 static_assert(!std::is_constructible<const OpE, OpE, OpE>::value, "Error");
779 static_assert(!std::is_constructible<OpSE, OpSE, OpSE>::value, "Error");
780 static_assert(!std::is_constructible<const OpSE, OpSE, OpSE>::value, "Error");
781 static_assert(!std::is_constructible<OpE, B, std::nullptr_t>::value, "Error");
782 static_assert(!std::is_constructible<const OpE, B, std::nullptr_t>::value,
783 "Error");
784 static_assert(!std::is_constructible<OpSE, B, std::nullptr_t>::value, "Error");
785 static_assert(!std::is_constructible<const OpSE, B, std::nullptr_t>::value,
786 "Error");
787 static_assert(!std::is_constructible<OpE, int[], int[]>::value, "Error");
788 static_assert(!std::is_constructible<const OpE, int[], int[]>::value, "Error");
789 static_assert(!std::is_constructible<OpSE, int[], int[]>::value, "Error");
790 static_assert(!std::is_constructible<const OpSE, int[], int[]>::value, "Error");
791
792 static_assert(!std::is_constructible<int[], int, int>::value, "Error");
793 static_assert(!std::is_constructible<const int[], int, int>::value, "Error");
794
795 static_assert(std::is_constructible<int&, ImplicitTo<int&>>::value, "Error");
796 static_assert(std::is_constructible<const int&, ImplicitTo<int&&>>::value,
797 "Error");
798 static_assert(std::is_constructible<int&&, ImplicitTo<int&&>>::value, "Error");
799 static_assert(std::is_constructible<const int&, ImplicitTo<int>>::value,
800 "Error");
801
802 static_assert(!std::is_constructible<const int&, ExplicitTo<int>>::value,
803 "Error");
804 static_assert(!std::is_constructible<int&&, ExplicitTo<int>>::value, "Error");
805
806 // Binding through reference-compatible type is required to perform
807 // direct-initialization as described in [over.match.ref] p. 1 b. 1:
808 static_assert(std::is_constructible<int&, ExplicitTo<int&>>::value, "Error");
809 static_assert(std::is_constructible<const int&, ExplicitTo<int&&>>::value,
810 "Error");
811 static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "Error");
812
813 // Binding through temporary behaves like copy-initialization,
814 // see [dcl.init.ref] p. 5, very last sub-bullet:
815 static_assert(!std::is_constructible<const int&, ExplicitTo<double&&>>::value,
816 "Error");
817 static_assert(!std::is_constructible<int&&, ExplicitTo<double&&>>::value,
818 "Error");
819
820 static_assert(std::is_constructible<void(&&)(), void(&)()>::value, "Error");