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