| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
// Copyright (C) 2011-2025 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 |
#ifndef __cpp_aggregate_paren_init |
| 111 |
static_assert(!std::is_constructible<D, B>::value, "Error"); |
| 112 |
#endif |
| 113 |
static_assert(!std::is_constructible<int[], int[1]>::value, "Error"); |
| 114 |
static_assert(!std::is_constructible<int[1], int[]>::value, "Error"); |
| 115 |
static_assert(!std::is_constructible<int[], Empty>::value, "Error"); |
| 116 |
static_assert(!std::is_constructible<int[], std::nullptr_t>::value, "Error"); |
| 117 |
static_assert(!std::is_constructible<int[1], Abstract>::value, "Error"); |
| 118 |
|
| 119 |
static_assert(std::is_constructible<const int*, int*>::value, "Error"); |
| 120 |
static_assert(std::is_constructible<const void*, void*>::value, "Error"); |
| 121 |
static_assert(std::is_constructible<const void*, int*>::value, "Error"); |
| 122 |
static_assert(!std::is_constructible<int*, const void*>::value, "Error"); |
| 123 |
|
| 124 |
static_assert(std::is_constructible<int, E>::value, "Error"); |
| 125 |
static_assert(!std::is_constructible<E, int>::value, "Error"); |
| 126 |
static_assert(!std::is_constructible<E, E2>::value, "Error"); |
| 127 |
static_assert(std::is_constructible<E, E>::value, "Error"); |
| 128 |
static_assert(std::is_constructible<bool, E>::value, "Error"); |
| 129 |
static_assert(!std::is_constructible<E, bool>::value, "Error"); |
| 130 |
static_assert(std::is_constructible<double, E>::value, "Error"); |
| 131 |
static_assert(!std::is_constructible<E, double>::value, "Error"); |
| 132 |
static_assert(!std::is_constructible<std::nullptr_t, E>::value, "Error"); |
| 133 |
static_assert(!std::is_constructible<E, std::nullptr_t>::value, "Error"); |
| 134 |
|
| 135 |
static_assert(std::is_constructible<int, OpE>::value, "Error"); |
| 136 |
static_assert(!std::is_constructible<OpE, int>::value, "Error"); |
| 137 |
static_assert(!std::is_constructible<OpE, E2>::value, "Error"); |
| 138 |
static_assert(std::is_constructible<OpE, OpE>::value, "Error"); |
| 139 |
static_assert(std::is_constructible<bool, OpE>::value, "Error"); |
| 140 |
static_assert(!std::is_constructible<OpE, bool>::value, "Error"); |
| 141 |
static_assert(std::is_constructible<double, OpE>::value, "Error"); |
| 142 |
static_assert(!std::is_constructible<OpE, double>::value, "Error"); |
| 143 |
static_assert(!std::is_constructible<std::nullptr_t, OpE>::value, "Error"); |
| 144 |
static_assert(!std::is_constructible<OpE, std::nullptr_t>::value, "Error"); |
| 145 |
|
| 146 |
static_assert(!std::is_constructible<int, SE>::value, "Error"); |
| 147 |
static_assert(!std::is_constructible<SE, int>::value, "Error"); |
| 148 |
static_assert(!std::is_constructible<E, SE>::value, "Error"); |
| 149 |
static_assert(!std::is_constructible<SE, SE2>::value, "Error"); |
| 150 |
static_assert(std::is_constructible<SE, SE>::value, "Error"); |
| 151 |
static_assert(!std::is_constructible<bool, SE>::value, "Error"); |
| 152 |
static_assert(!std::is_constructible<SE, bool>::value, "Error"); |
| 153 |
static_assert(!std::is_constructible<double, SE>::value, "Error"); |
| 154 |
static_assert(!std::is_constructible<SE, double>::value, "Error"); |
| 155 |
static_assert(!std::is_constructible<std::nullptr_t, SE>::value, "Error"); |
| 156 |
static_assert(!std::is_constructible<SE, std::nullptr_t>::value, "Error"); |
| 157 |
|
| 158 |
static_assert(!std::is_constructible<int, OpSE>::value, "Error"); |
| 159 |
static_assert(!std::is_constructible<OpSE, int>::value, "Error"); |
| 160 |
static_assert(!std::is_constructible<OpE, OpSE>::value, "Error"); |
| 161 |
static_assert(!std::is_constructible<OpSE, SE2>::value, "Error"); |
| 162 |
static_assert(std::is_constructible<OpSE, OpSE>::value, "Error"); |
| 163 |
static_assert(!std::is_constructible<bool, OpSE>::value, "Error"); |
| 164 |
static_assert(!std::is_constructible<OpSE, bool>::value, "Error"); |
| 165 |
static_assert(!std::is_constructible<double, OpSE>::value, "Error"); |
| 166 |
static_assert(!std::is_constructible<OpSE, double>::value, "Error"); |
| 167 |
static_assert(!std::is_constructible<std::nullptr_t, OpSE>::value, "Error"); |
| 168 |
static_assert(!std::is_constructible<OpSE, std::nullptr_t>::value, "Error"); |
| 169 |
|
| 170 |
static_assert(!std::is_constructible<D*, B*>::value, "Error"); |
| 171 |
static_assert(!std::is_constructible<const volatile D*, B*>::value, "Error"); |
| 172 |
static_assert(!std::is_constructible<D*, const volatile B*>::value, "Error"); |
| 173 |
|
| 174 |
static_assert(!std::is_constructible<D*, B* const>::value, "Error"); |
| 175 |
static_assert(!std::is_constructible<const volatile D*, B* const>::value, |
| 176 |
"Error"); |
| 177 |
static_assert(!std::is_constructible<D*, const volatile B* const>::value, |
| 178 |
"Error"); |
| 179 |
|
| 180 |
static_assert(!std::is_constructible<D*, B*&>::value, "Error"); |
| 181 |
static_assert(!std::is_constructible<const volatile D*, B*&>::value, "Error"); |
| 182 |
static_assert(!std::is_constructible<D*, const volatile B*&>::value, "Error"); |
| 183 |
|
| 184 |
static_assert(!std::is_constructible<int B::*, int D::*>::value, "Error"); |
| 185 |
static_assert(!std::is_constructible<const volatile int B::*, int D::*>::value, |
| 186 |
"Error"); |
| 187 |
static_assert(!std::is_constructible<int B::*, const volatile int D::*>::value, |
| 188 |
"Error"); |
| 189 |
|
| 190 |
static_assert(!std::is_constructible<int B::*, int D::* const>::value, "Error"); |
| 191 |
static_assert(!std::is_constructible<const volatile int B::*, |
| 192 |
int D::* const>::value, "Error"); |
| 193 |
static_assert(!std::is_constructible<int B::*, |
| 194 |
const volatile int D::* const>::value, "Error"); |
| 195 |
|
| 196 |
static_assert(!std::is_constructible<int B::*, int D::*&>::value, "Error"); |
| 197 |
static_assert(!std::is_constructible<const volatile int B::*, |
| 198 |
int D::*&>::value, "Error"); |
| 199 |
static_assert(!std::is_constructible<int B::*, |
| 200 |
const volatile int D::*&>::value, "Error"); |
| 201 |
|
| 202 |
static_assert(!std::is_constructible<int B::*, int D::* const &>::value, |
| 203 |
"Error"); |
| 204 |
static_assert(!std::is_constructible<const volatile int B::*, |
| 205 |
int D::* const &>::value, "Error"); |
| 206 |
static_assert(!std::is_constructible<int B::*, |
| 207 |
const volatile int D::* const &>::value, "Error"); |
| 208 |
|
| 209 |
static_assert(!std::is_constructible<int&&, int&>::value, "Error"); |
| 210 |
static_assert(!std::is_constructible<const int&&, int&>::value, "Error"); |
| 211 |
|
| 212 |
static_assert(std::is_constructible<B&, D&>::value, "Error"); |
| 213 |
static_assert(std::is_constructible<B&&, D&&>::value, "Error"); |
| 214 |
static_assert(std::is_constructible<const B&, D&>::value, "Error"); |
| 215 |
static_assert(std::is_constructible<const B&&, D&&>::value, "Error"); |
| 216 |
static_assert(!std::is_constructible<B&, const D&>::value, "Error"); |
| 217 |
static_assert(!std::is_constructible<B&&, const D&&>::value, "Error"); |
| 218 |
|
| 219 |
#if __cpp_aggregate_bases && __cpp_aggregate_paren_init |
| 220 |
// In C++20 an rvalue reference or const lvalue reference can bind to a |
| 221 |
// temporary of aggregate type that is initialized from a base class value. |
| 222 |
constexpr bool v = true; |
| 223 |
#else |
| 224 |
constexpr bool v = false; |
| 225 |
#endif |
| 226 |
|
| 227 |
static_assert(!std::is_constructible<D&, B&>::value, "Error"); |
| 228 |
static_assert(v == std::is_constructible<D&&, B&&>::value, "Error"); |
| 229 |
static_assert(!std::is_constructible<D&, const B&>::value, "Error"); |
| 230 |
static_assert(v == std::is_constructible<D&&, const B&&>::value, "Error"); |
| 231 |
static_assert(v == std::is_constructible<const D&, B&>::value, "Error"); |
| 232 |
static_assert(v == std::is_constructible<const D&&, B&&>::value, "Error"); |
| 233 |
|
| 234 |
static_assert(!std::is_constructible<B&&, B&>::value, "Error"); |
| 235 |
static_assert(!std::is_constructible<B&&, D&>::value, "Error"); |
| 236 |
static_assert(std::is_constructible<B&&, ImplicitTo<D&&>>::value, "Error"); |
| 237 |
static_assert(std::is_constructible<B&&, ImplicitTo<D&&>&>::value, "Error"); |
| 238 |
static_assert(std::is_constructible<int&&, double&>::value, "Error"); |
| 239 |
static_assert(std::is_constructible<const int&, |
| 240 |
ImplicitTo<int&>&>::value, "Error"); |
| 241 |
static_assert(std::is_constructible<const int&, |
| 242 |
ImplicitTo<int&>>::value, "Error"); |
| 243 |
static_assert(std::is_constructible<const int&, |
| 244 |
ExplicitTo<int&>&>::value, "Error"); |
| 245 |
static_assert(std::is_constructible<const int&, |
| 246 |
ExplicitTo<int&>>::value, "Error"); |
| 247 |
|
| 248 |
static_assert(!std::is_constructible<B&&, ExplicitTo<D&&>>::value, "Error"); |
| 249 |
static_assert(!std::is_constructible<B&&, ExplicitTo<D&&>&>::value, "Error"); |
| 250 |
|
| 251 |
static_assert(!std::is_constructible<B&, B&&>::value, "Error"); |
| 252 |
static_assert(!std::is_constructible<D&, B&&>::value, "Error"); |
| 253 |
static_assert(!std::is_constructible<B&, D&&>::value, "Error"); |
| 254 |
|
| 255 |
static_assert(std::is_constructible<void(&)(), void(&)()>::value, "Error"); |
| 256 |
static_assert(std::is_constructible<void(&&)(), void(&&)()>::value, "Error"); |
| 257 |
static_assert(std::is_constructible<void(&&)(), void()>::value, "Error"); |
| 258 |
|
| 259 |
static_assert(!std::is_constructible<void>::value, "Error" ); |
| 260 |
static_assert(!std::is_constructible<void, int>::value, "Error" ); |
| 261 |
static_assert(!std::is_constructible<void, int, double>::value, "Error" ); |
| 262 |
|
| 263 |
static_assert(!std::is_constructible<int&>::value, "Error" ); |
| 264 |
static_assert(!std::is_constructible<const int&>::value, "Error" ); |
| 265 |
static_assert(!std::is_constructible<int&, int, int>::value, "Error" ); |
| 266 |
static_assert(!std::is_constructible<const int&, int, int>::value, "Error" ); |
| 267 |
|
| 268 |
static_assert(std::is_constructible<void(&)(), void()>::value, "Error"); |
| 269 |
static_assert(std::is_constructible<void(&)(), void(&&)()>::value, "Error"); |
| 270 |
|
| 271 |
static_assert(std::is_constructible<int&, int&>::value, "Error"); |
| 272 |
static_assert(!std::is_constructible<int&, const int&>::value, "Error"); |
| 273 |
static_assert(!std::is_constructible<int&, int>::value, "Error"); |
| 274 |
static_assert(!std::is_constructible<int&, int&&>::value, "Error"); |
| 275 |
static_assert(!std::is_constructible<int&, const int&&>::value, "Error"); |
| 276 |
static_assert(std::is_constructible<const int&, int&>::value, "Error"); |
| 277 |
static_assert(std::is_constructible<const int&, int>::value, "Error"); |
| 278 |
static_assert(std::is_constructible<const int&, const int>::value, "Error"); |
| 279 |
static_assert(std::is_constructible<const int&, int&&>::value, "Error"); |
| 280 |
static_assert(std::is_constructible<const int&, const int&&>::value, "Error"); |
| 281 |
static_assert(std::is_constructible<volatile int&, int&>::value, "Error"); |
| 282 |
static_assert(!std::is_constructible<volatile int&, const int&>::value, |
| 283 |
"Error"); |
| 284 |
static_assert(!std::is_constructible<volatile int&, int>::value, "Error"); |
| 285 |
static_assert(!std::is_constructible<volatile int&, int&&>::value, "Error"); |
| 286 |
static_assert(!std::is_constructible<volatile int&, const int&&>::value, |
| 287 |
"Error"); |
| 288 |
static_assert(std::is_constructible<const volatile int&, int&>::value, "Error"); |
| 289 |
static_assert(!std::is_constructible<const volatile int&, int>::value, "Error"); |
| 290 |
static_assert(!std::is_constructible<const volatile int&, const int>::value, |
| 291 |
"Error"); |
| 292 |
static_assert(!std::is_constructible<const volatile int&, int&&>::value, |
| 293 |
"Error"); |
| 294 |
static_assert(!std::is_constructible<const volatile int&, const int&&>::value, |
| 295 |
"Error"); |
| 296 |
|
| 297 |
static_assert(std::is_constructible<int&&, int>::value, "Error"); |
| 298 |
static_assert(std::is_constructible<int&&, int&&>::value, "Error"); |
| 299 |
static_assert(!std::is_constructible<int&&, const int&&>::value, "Error"); |
| 300 |
static_assert(!std::is_constructible<int&&, int&>::value, "Error"); |
| 301 |
static_assert(!std::is_constructible<int&&, const int&>::value, "Error"); |
| 302 |
static_assert(std::is_constructible<int&&, double&>::value, "Error"); |
| 303 |
static_assert(std::is_constructible<const int&&, int>::value, "Error"); |
| 304 |
static_assert(std::is_constructible<const int&&, int&&>::value, "Error"); |
| 305 |
static_assert(std::is_constructible<const int&&, const int>::value, "Error"); |
| 306 |
static_assert(std::is_constructible<const int&&, const int&&>::value, "Error"); |
| 307 |
static_assert(!std::is_constructible<int&&, const int&>::value, "Error"); |
| 308 |
static_assert(!std::is_constructible<const int&&, int&>::value, "Error"); |
| 309 |
static_assert(!std::is_constructible<const int&&, const int&>::value, "Error"); |
| 310 |
static_assert(std::is_constructible<volatile int&&, int>::value, "Error"); |
| 311 |
static_assert(std::is_constructible<volatile int&&, int&&>::value, "Error"); |
| 312 |
static_assert(!std::is_constructible<volatile int&&, const int&&>::value, |
| 313 |
"Error"); |
| 314 |
static_assert(!std::is_constructible<volatile int&&, int&>::value, "Error"); |
| 315 |
static_assert(!std::is_constructible<volatile int&&, const int&>::value, |
| 316 |
"Error"); |
| 317 |
static_assert(std::is_constructible<volatile int&&, double&>::value, "Error"); |
| 318 |
static_assert(std::is_constructible<volatile const int&&, int>::value, "Error"); |
| 319 |
static_assert(std::is_constructible<const volatile int&&, int&&>::value, |
| 320 |
"Error"); |
| 321 |
static_assert(std::is_constructible<const volatile int&&, const int>::value, |
| 322 |
"Error"); |
| 323 |
static_assert(std::is_constructible<const volatile int&&, const int&&>::value, |
| 324 |
"Error"); |
| 325 |
static_assert(!std::is_constructible<volatile int&&, const int&>::value, |
| 326 |
"Error"); |
| 327 |
static_assert(!std::is_constructible<const volatile int&&, int&>::value, |
| 328 |
"Error"); |
| 329 |
static_assert(!std::is_constructible<const volatile int&&, |
| 330 |
const int&>::value, "Error"); |
| 331 |
|
| 332 |
static_assert(std::is_constructible<Empty&, Empty&>::value, "Error"); |
| 333 |
static_assert(!std::is_constructible<Empty&, const Empty&>::value, "Error"); |
| 334 |
static_assert(!std::is_constructible<Empty&, Empty>::value, "Error"); |
| 335 |
static_assert(!std::is_constructible<Empty&, Empty&&>::value, "Error"); |
| 336 |
static_assert(!std::is_constructible<Empty&, const Empty&&>::value, "Error"); |
| 337 |
static_assert(std::is_constructible<const Empty&, Empty&>::value, "Error"); |
| 338 |
static_assert(std::is_constructible<const Empty&, Empty>::value, "Error"); |
| 339 |
static_assert(std::is_constructible<const Empty&, const Empty>::value, "Error"); |
| 340 |
static_assert(std::is_constructible<const Empty&, Empty&&>::value, "Error"); |
| 341 |
static_assert(std::is_constructible<const Empty&, const Empty&&>::value, |
| 342 |
"Error"); |
| 343 |
static_assert(std::is_constructible<volatile Empty&, Empty&>::value, "Error"); |
| 344 |
static_assert(!std::is_constructible<volatile Empty&, const Empty&>::value, |
| 345 |
"Error"); |
| 346 |
static_assert(!std::is_constructible<volatile Empty&, Empty>::value, "Error"); |
| 347 |
static_assert(!std::is_constructible<volatile Empty&, Empty&&>::value, "Error"); |
| 348 |
static_assert(!std::is_constructible<volatile Empty&, const Empty&&>::value, |
| 349 |
"Error"); |
| 350 |
static_assert(std::is_constructible<const volatile Empty&, Empty&>::value, |
| 351 |
"Error"); |
| 352 |
static_assert(!std::is_constructible<const volatile Empty&, Empty>::value, |
| 353 |
"Error"); |
| 354 |
static_assert(!std::is_constructible<const volatile Empty&, |
| 355 |
const Empty>::value, "Error"); |
| 356 |
static_assert(!std::is_constructible<const volatile Empty&, |
| 357 |
Empty&&>::value, "Error"); |
| 358 |
static_assert(!std::is_constructible<const volatile Empty&, |
| 359 |
const Empty&&>::value, "Error"); |
| 360 |
|
| 361 |
static_assert(std::is_constructible<Empty&&, Empty>::value, "Error"); |
| 362 |
static_assert(std::is_constructible<Empty&&, Empty&&>::value, "Error"); |
| 363 |
static_assert(!std::is_constructible<Empty&&, const Empty&&>::value, "Error"); |
| 364 |
static_assert(!std::is_constructible<Empty&&, Empty&>::value, "Error"); |
| 365 |
static_assert(!std::is_constructible<Empty&&, const Empty&>::value, "Error"); |
| 366 |
static_assert(!std::is_constructible<Empty&&, double&>::value, "Error"); |
| 367 |
static_assert(!std::is_constructible<Empty&&, const double&>::value, "Error"); |
| 368 |
static_assert(std::is_constructible<const Empty&&, Empty>::value, "Error"); |
| 369 |
static_assert(std::is_constructible<const Empty&&, Empty&&>::value, "Error"); |
| 370 |
static_assert(std::is_constructible<const Empty&&, const Empty>::value, |
| 371 |
"Error"); |
| 372 |
static_assert(std::is_constructible<const Empty&&, const Empty&&>::value, |
| 373 |
"Error"); |
| 374 |
static_assert(!std::is_constructible<Empty&&, const Empty&>::value, "Error"); |
| 375 |
static_assert(!std::is_constructible<const Empty&&, Empty&>::value, "Error"); |
| 376 |
static_assert(!std::is_constructible<const Empty&&, const Empty&>::value, |
| 377 |
"Error"); |
| 378 |
static_assert(std::is_constructible<volatile Empty&&, Empty>::value, "Error"); |
| 379 |
static_assert(std::is_constructible<volatile Empty&&, Empty&&>::value, "Error"); |
| 380 |
static_assert(!std::is_constructible<volatile Empty&&, const Empty&&>::value, |
| 381 |
"Error"); |
| 382 |
static_assert(!std::is_constructible<volatile Empty&&, Empty&>::value, "Error"); |
| 383 |
static_assert(!std::is_constructible<volatile Empty&&, const Empty&>::value, |
| 384 |
"Error"); |
| 385 |
static_assert(!std::is_constructible<volatile Empty&&, double&>::value, |
| 386 |
"Error"); |
| 387 |
static_assert(!std::is_constructible<volatile Empty&&, const double&>::value, |
| 388 |
"Error"); |
| 389 |
static_assert(std::is_constructible<const volatile Empty&&, Empty>::value, |
| 390 |
"Error"); |
| 391 |
static_assert(std::is_constructible<const volatile Empty&&, Empty&&>::value, |
| 392 |
"Error"); |
| 393 |
static_assert(std::is_constructible<const volatile Empty&&, |
| 394 |
const Empty>::value, "Error"); |
| 395 |
static_assert(std::is_constructible<const volatile Empty&&, |
| 396 |
const Empty&&>::value, "Error"); |
| 397 |
static_assert(!std::is_constructible<volatile Empty&&, |
| 398 |
const Empty&>::value, "Error"); |
| 399 |
static_assert(!std::is_constructible<const volatile Empty&&, |
| 400 |
Empty&>::value, "Error"); |
| 401 |
static_assert(!std::is_constructible<const volatile Empty&&, |
| 402 |
const Empty&>::value, "Error"); |
| 403 |
|
| 404 |
static_assert(std::is_constructible<Ellipsis, int>::value, "Error"); |
| 405 |
static_assert(std::is_constructible<Ellipsis, Empty>::value, "Error"); |
| 406 |
static_assert(std::is_constructible<Ellipsis, std::nullptr_t>::value, "Error"); |
| 407 |
static_assert(std::is_constructible<Ellipsis, int[]>::value, "Error"); |
| 408 |
static_assert(std::is_constructible<Ellipsis, int[1]>::value, "Error"); |
| 409 |
static_assert(!std::is_constructible<Ellipsis, void>::value, "Error"); |
| 410 |
|
| 411 |
static_assert(std::is_constructible<int(&)[1], int(&)[1]>::value, "Error"); |
| 412 |
static_assert(std::is_constructible<const int(&)[1], |
| 413 |
int(&)[1]>::value, "Error"); |
| 414 |
static_assert(std::is_constructible<volatile int(&)[1], |
| 415 |
int(&)[1]>::value, "Error"); |
| 416 |
static_assert(std::is_constructible<const volatile int(&)[1], |
| 417 |
int(&)[1]>::value, "Error"); |
| 418 |
static_assert(!std::is_constructible<int(&)[1], |
| 419 |
const int(&)[1]>::value, "Error"); |
| 420 |
static_assert(!std::is_constructible<const int(&)[1], |
| 421 |
volatile int(&)[1]>::value, "Error"); |
| 422 |
|
| 423 |
static_assert(std::is_constructible<int(&)[], int(&)[]>::value, "Error"); |
| 424 |
|
| 425 |
static_assert(!std::is_constructible<int(&)[1], int(&)[2]>::value, "Error"); |
| 426 |
static_assert(!std::is_constructible<int(&)[1], int&>::value, "Error"); |
| 427 |
static_assert(!std::is_constructible<int&, int(&)[1]>::value, "Error"); |
| 428 |
|
| 429 |
#ifndef __cpp_aggregate_paren_init |
| 430 |
static_assert(!std::is_constructible<U, int>::value, "Error"); |
| 431 |
#endif |
| 432 |
static_assert(!std::is_constructible<U, Empty>::value, "Error"); |
| 433 |
|
| 434 |
static_assert(!std::is_constructible<void(), void()>::value, "Error"); |
| 435 |
static_assert(!std::is_constructible<void(), int>::value, "Error"); |
| 436 |
static_assert(!std::is_constructible<void(), Abstract>::value, "Error"); |
| 437 |
static_assert(!std::is_constructible<void(), std::nullptr_t>::value, "Error"); |
| 438 |
static_assert(!std::is_constructible<void(), Empty>::value, "Error"); |
| 439 |
static_assert(!std::is_constructible<void(), U>::value, "Error"); |
| 440 |
static_assert(!std::is_constructible<void(), E>::value, "Error"); |
| 441 |
static_assert(!std::is_constructible<void(), SE>::value, "Error"); |
| 442 |
static_assert(!std::is_constructible<void(), OpE>::value, "Error"); |
| 443 |
static_assert(!std::is_constructible<void(), OpSE>::value, "Error"); |
| 444 |
static_assert(!std::is_constructible<void(), int[]>::value, "Error"); |
| 445 |
static_assert(!std::is_constructible<void(), int[1]>::value, "Error"); |
| 446 |
|
| 447 |
static_assert(!std::is_constructible<void() const, |
| 448 |
void() volatile>::value, "Error"); |
| 449 |
static_assert(!std::is_constructible<void() const, int>::value, "Error"); |
| 450 |
static_assert(!std::is_constructible<void() const, Abstract>::value, "Error"); |
| 451 |
static_assert(!std::is_constructible<void() const, std::nullptr_t>::value, |
| 452 |
"Error"); |
| 453 |
static_assert(!std::is_constructible<void() const, Empty>::value, "Error"); |
| 454 |
static_assert(!std::is_constructible<void() const, U>::value, "Error"); |
| 455 |
static_assert(!std::is_constructible<void() const, E>::value, "Error"); |
| 456 |
static_assert(!std::is_constructible<void() const, SE>::value, "Error"); |
| 457 |
static_assert(!std::is_constructible<void() const, OpE>::value, "Error"); |
| 458 |
static_assert(!std::is_constructible<void() const, OpSE>::value, "Error"); |
| 459 |
static_assert(!std::is_constructible<void() const, int[]>::value, "Error"); |
| 460 |
static_assert(!std::is_constructible<void() const, int[1]>::value, "Error"); |
| 461 |
|
| 462 |
static_assert(!std::is_constructible<void(int), void()>::value, "Error"); |
| 463 |
static_assert(!std::is_constructible<int, void()>::value, "Error"); |
| 464 |
static_assert(!std::is_constructible<Abstract, void()>::value, "Error"); |
| 465 |
static_assert(!std::is_constructible<std::nullptr_t, void()>::value, "Error"); |
| 466 |
static_assert(!std::is_constructible<Empty, void()>::value, "Error"); |
| 467 |
static_assert(!std::is_constructible<U, void()>::value, "Error"); |
| 468 |
static_assert(!std::is_constructible<E, void()>::value, "Error"); |
| 469 |
static_assert(!std::is_constructible<SE, void()>::value, "Error"); |
| 470 |
static_assert(!std::is_constructible<OpE, void()>::value, "Error"); |
| 471 |
static_assert(!std::is_constructible<OpSE, void()>::value, "Error"); |
| 472 |
static_assert(!std::is_constructible<int[], void()>::value, "Error"); |
| 473 |
static_assert(!std::is_constructible<int[1], void()>::value, "Error"); |
| 474 |
|
| 475 |
static_assert(!std::is_constructible<void(int) const, |
| 476 |
void() const>::value, "Error"); |
| 477 |
static_assert(!std::is_constructible<int, void() const>::value, "Error"); |
| 478 |
static_assert(!std::is_constructible<Abstract, void() const>::value, "Error"); |
| 479 |
static_assert(!std::is_constructible<std::nullptr_t, void() const>::value, |
| 480 |
"Error"); |
| 481 |
static_assert(!std::is_constructible<Empty, void() const>::value, "Error"); |
| 482 |
static_assert(!std::is_constructible<U, void() const>::value, "Error"); |
| 483 |
static_assert(!std::is_constructible<E, void() const>::value, "Error"); |
| 484 |
static_assert(!std::is_constructible<SE, void() const>::value, "Error"); |
| 485 |
static_assert(!std::is_constructible<OpE, void() const>::value, "Error"); |
| 486 |
static_assert(!std::is_constructible<OpSE, void() const>::value, "Error"); |
| 487 |
static_assert(!std::is_constructible<int[], void() const>::value, "Error"); |
| 488 |
static_assert(!std::is_constructible<int[1], void() const>::value, "Error"); |
| 489 |
|
| 490 |
static_assert(!std::is_constructible<void, int, int>::value, "Error"); |
| 491 |
static_assert(!std::is_constructible<void, Empty, B>::value, "Error"); |
| 492 |
static_assert(!std::is_constructible<void, Empty, Empty>::value, "Error"); |
| 493 |
static_assert(!std::is_constructible<void, U, Empty>::value, "Error"); |
| 494 |
static_assert(!std::is_constructible<void, U, U>::value, "Error"); |
| 495 |
static_assert(!std::is_constructible<void, std::nullptr_t, |
| 496 |
std::nullptr_t>::value, "Error"); |
| 497 |
static_assert(!std::is_constructible<void, int[1], int[1]>::value, "Error"); |
| 498 |
static_assert(!std::is_constructible<void, int[], int[]>::value, "Error"); |
| 499 |
static_assert(!std::is_constructible<void, void, int>::value, "Error"); |
| 500 |
static_assert(!std::is_constructible<void, void, void>::value, "Error"); |
| 501 |
static_assert(!std::is_constructible<void, void(), void()>::value, "Error"); |
| 502 |
static_assert(!std::is_constructible<void, void() const, |
| 503 |
void() volatile>::value, "Error"); |
| 504 |
|
| 505 |
static_assert(!std::is_constructible<int, int, int>::value, "Error"); |
| 506 |
static_assert(!std::is_constructible<const int, int, int>::value, "Error"); |
| 507 |
static_assert(!std::is_constructible<int, void, int>::value, "Error"); |
| 508 |
static_assert(!std::is_constructible<const int, void, int>::value, "Error"); |
| 509 |
static_assert(!std::is_constructible<int, void, void>::value, "Error"); |
| 510 |
static_assert(!std::is_constructible<const int, void, void>::value, "Error"); |
| 511 |
static_assert(!std::is_constructible<bool, int, int>::value, "Error"); |
| 512 |
static_assert(!std::is_constructible<const bool, int, int>::value, "Error"); |
| 513 |
static_assert(!std::is_constructible<std::nullptr_t, int, int>::value, "Error"); |
| 514 |
static_assert(!std::is_constructible<const std::nullptr_t, int, int>::value, |
| 515 |
"Error"); |
| 516 |
static_assert(!std::is_constructible<std::nullptr_t, void, int>::value, |
| 517 |
"Error"); |
| 518 |
static_assert(!std::is_constructible<const std::nullptr_t, void, int>::value, |
| 519 |
"Error"); |
| 520 |
static_assert(!std::is_constructible<std::nullptr_t, void, void>::value, |
| 521 |
"Error"); |
| 522 |
static_assert(!std::is_constructible<const std::nullptr_t, void, void>::value, |
| 523 |
"Error"); |
| 524 |
static_assert(!std::is_constructible<E, int, int>::value, "Error"); |
| 525 |
static_assert(!std::is_constructible<const E, int, int>::value, "Error"); |
| 526 |
static_assert(!std::is_constructible<E, void, int>::value, "Error"); |
| 527 |
static_assert(!std::is_constructible<const E, void, int>::value, "Error"); |
| 528 |
static_assert(!std::is_constructible<E, void, void>::value, "Error"); |
| 529 |
static_assert(!std::is_constructible<const E, void, void>::value, "Error"); |
| 530 |
static_assert(!std::is_constructible<SE, int, int>::value, "Error"); |
| 531 |
static_assert(!std::is_constructible<const SE, int, int>::value, "Error"); |
| 532 |
static_assert(!std::is_constructible<SE, void, int>::value, "Error"); |
| 533 |
static_assert(!std::is_constructible<const SE, void, int>::value, "Error"); |
| 534 |
static_assert(!std::is_constructible<SE, void, void>::value, "Error"); |
| 535 |
static_assert(!std::is_constructible<const SE, void, void>::value, "Error"); |
| 536 |
static_assert(!std::is_constructible<OpE, int, int>::value, "Error"); |
| 537 |
static_assert(!std::is_constructible<const OpE, int, int>::value, "Error"); |
| 538 |
static_assert(!std::is_constructible<OpE, void, int>::value, "Error"); |
| 539 |
static_assert(!std::is_constructible<const OpE, void, int>::value, "Error"); |
| 540 |
static_assert(!std::is_constructible<OpE, void, void>::value, "Error"); |
| 541 |
static_assert(!std::is_constructible<const OpE, void, void>::value, "Error"); |
| 542 |
static_assert(!std::is_constructible<OpSE, int, int>::value, "Error"); |
| 543 |
static_assert(!std::is_constructible<const OpSE, int, int>::value, "Error"); |
| 544 |
static_assert(!std::is_constructible<OpSE, void, int>::value, "Error"); |
| 545 |
static_assert(!std::is_constructible<const OpSE, void, int>::value, "Error"); |
| 546 |
static_assert(!std::is_constructible<OpSE, void, void>::value, "Error"); |
| 547 |
static_assert(!std::is_constructible<const OpSE, void, void>::value, "Error"); |
| 548 |
static_assert(!std::is_constructible<Empty, int, int>::value, "Error"); |
| 549 |
static_assert(!std::is_constructible<const Empty, int, int>::value, "Error"); |
| 550 |
static_assert(!std::is_constructible<Empty, void, int>::value, "Error"); |
| 551 |
static_assert(!std::is_constructible<const Empty, void, int>::value, "Error"); |
| 552 |
static_assert(!std::is_constructible<Empty, void, void>::value, "Error"); |
| 553 |
static_assert(!std::is_constructible<const Empty, void, void>::value, "Error"); |
| 554 |
static_assert(!std::is_constructible<U, int, int>::value, "Error"); |
| 555 |
static_assert(!std::is_constructible<const U, int, int>::value, "Error"); |
| 556 |
static_assert(!std::is_constructible<U, void, int>::value, "Error"); |
| 557 |
static_assert(!std::is_constructible<const U, void, int>::value, "Error"); |
| 558 |
static_assert(!std::is_constructible<U, void, void>::value, "Error"); |
| 559 |
static_assert(!std::is_constructible<const U, void, void>::value, "Error"); |
| 560 |
static_assert(!std::is_constructible<B, int, int>::value, "Error"); |
| 561 |
static_assert(!std::is_constructible<const B, int, int>::value, "Error"); |
| 562 |
static_assert(!std::is_constructible<B, void, int>::value, "Error"); |
| 563 |
static_assert(!std::is_constructible<const B, void, int>::value, "Error"); |
| 564 |
static_assert(!std::is_constructible<B, void, void>::value, "Error"); |
| 565 |
static_assert(!std::is_constructible<const B, void, void>::value, "Error"); |
| 566 |
static_assert(!std::is_constructible<Any, int, int>::value, "Error"); |
| 567 |
static_assert(!std::is_constructible<const Any, int, int>::value, "Error"); |
| 568 |
static_assert(!std::is_constructible<Any, void, int>::value, "Error"); |
| 569 |
static_assert(!std::is_constructible<const Any, void, int>::value, "Error"); |
| 570 |
static_assert(!std::is_constructible<Any, void, void>::value, "Error"); |
| 571 |
static_assert(!std::is_constructible<const Any, void, void>::value, "Error"); |
| 572 |
static_assert(!std::is_constructible<nAny, void, int>::value, "Error"); |
| 573 |
static_assert(!std::is_constructible<const nAny, void, int>::value, "Error"); |
| 574 |
static_assert(!std::is_constructible<nAny, void, void>::value, "Error"); |
| 575 |
static_assert(!std::is_constructible<const nAny, void, void>::value, "Error"); |
| 576 |
static_assert(!std::is_constructible<FromArgs<>, int, int>::value, "Error"); |
| 577 |
static_assert(!std::is_constructible<const FromArgs<>, int, int>::value, |
| 578 |
"Error"); |
| 579 |
static_assert(!std::is_constructible<FromArgs<>, void, int>::value, "Error"); |
| 580 |
static_assert(!std::is_constructible<const FromArgs<>, void, int>::value, |
| 581 |
"Error"); |
| 582 |
static_assert(!std::is_constructible<FromArgs<>, void, void>::value, "Error"); |
| 583 |
static_assert(!std::is_constructible<const FromArgs<>, void, void>::value, |
| 584 |
"Error"); |
| 585 |
static_assert(!std::is_constructible<Abstract, int, int>::value, "Error"); |
| 586 |
static_assert(!std::is_constructible<const Abstract, int, int>::value, "Error"); |
| 587 |
static_assert(!std::is_constructible<Abstract, void, int>::value, "Error"); |
| 588 |
static_assert(!std::is_constructible<const Abstract, void, int>::value, |
| 589 |
"Error"); |
| 590 |
static_assert(!std::is_constructible<Abstract, void, void>::value, "Error"); |
| 591 |
static_assert(!std::is_constructible<const Abstract, void, void>::value, |
| 592 |
"Error"); |
| 593 |
static_assert(!std::is_constructible<AbstractDelDtor, int, int>::value, |
| 594 |
"Error"); |
| 595 |
static_assert(!std::is_constructible<const AbstractDelDtor, int, int>::value, |
| 596 |
"Error"); |
| 597 |
static_assert(!std::is_constructible<AbstractDelDtor, void, int>::value, |
| 598 |
"Error"); |
| 599 |
static_assert(!std::is_constructible<const AbstractDelDtor, void, int>::value, |
| 600 |
"Error"); |
| 601 |
static_assert(!std::is_constructible<AbstractDelDtor, void, void>::value, |
| 602 |
"Error"); |
| 603 |
static_assert(!std::is_constructible<const AbstractDelDtor, void, void>::value, |
| 604 |
"Error"); |
| 605 |
static_assert(!std::is_constructible<int[1], int, int>::value, "Error"); |
| 606 |
static_assert(!std::is_constructible<const int[1], int, int>::value, "Error"); |
| 607 |
static_assert(!std::is_constructible<int[1], void, int>::value, "Error"); |
| 608 |
static_assert(!std::is_constructible<const int[1], void, int>::value, "Error"); |
| 609 |
static_assert(!std::is_constructible<int[1], void, void>::value, "Error"); |
| 610 |
static_assert(!std::is_constructible<const int[1], void, void>::value, "Error"); |
| 611 |
static_assert(!std::is_constructible<int&, int, int>::value, "Error"); |
| 612 |
static_assert(!std::is_constructible<int&, void, int>::value, "Error"); |
| 613 |
static_assert(!std::is_constructible<int&, void, void>::value, "Error"); |
| 614 |
static_assert(!std::is_constructible<int&, int&, int&>::value, "Error"); |
| 615 |
static_assert(!std::is_constructible<int&, void, int&>::value, "Error"); |
| 616 |
static_assert(!std::is_constructible<int&, void, void>::value, "Error"); |
| 617 |
static_assert(!std::is_constructible<std::nullptr_t&, int, int>::value, |
| 618 |
"Error"); |
| 619 |
static_assert(!std::is_constructible<std::nullptr_t&, void, int>::value, |
| 620 |
"Error"); |
| 621 |
static_assert(!std::is_constructible<std::nullptr_t&, void, void>::value, |
| 622 |
"Error"); |
| 623 |
static_assert(!std::is_constructible<E&, int, int>::value, "Error"); |
| 624 |
static_assert(!std::is_constructible<E&, void, int>::value, "Error"); |
| 625 |
static_assert(!std::is_constructible<E&, void, void>::value, "Error"); |
| 626 |
static_assert(!std::is_constructible<SE&, int, int>::value, "Error"); |
| 627 |
static_assert(!std::is_constructible<SE&, void, int>::value, "Error"); |
| 628 |
static_assert(!std::is_constructible<SE&, void, void>::value, "Error"); |
| 629 |
static_assert(!std::is_constructible<OpE&, int, int>::value, "Error"); |
| 630 |
static_assert(!std::is_constructible<OpE&, void, int>::value, "Error"); |
| 631 |
static_assert(!std::is_constructible<OpE&, void, void>::value, "Error"); |
| 632 |
static_assert(!std::is_constructible<OpSE&, int, int>::value, "Error"); |
| 633 |
static_assert(!std::is_constructible<OpSE&, void, int>::value, "Error"); |
| 634 |
static_assert(!std::is_constructible<OpSE&, void, void>::value, "Error"); |
| 635 |
static_assert(!std::is_constructible<Empty&, int, int>::value, "Error"); |
| 636 |
static_assert(!std::is_constructible<Empty&, void, int>::value, "Error"); |
| 637 |
static_assert(!std::is_constructible<Empty&, void, void>::value, "Error"); |
| 638 |
static_assert(!std::is_constructible<U&, int, int>::value, "Error"); |
| 639 |
static_assert(!std::is_constructible<U&, void, int>::value, "Error"); |
| 640 |
static_assert(!std::is_constructible<U&, void, void>::value, "Error"); |
| 641 |
static_assert(!std::is_constructible<B&, int, int>::value, "Error"); |
| 642 |
static_assert(!std::is_constructible<B&, void, int>::value, "Error"); |
| 643 |
static_assert(!std::is_constructible<B&, void, void>::value, "Error"); |
| 644 |
static_assert(!std::is_constructible<Any&, int, int>::value, "Error"); |
| 645 |
static_assert(!std::is_constructible<Any&, void, int>::value, "Error"); |
| 646 |
static_assert(!std::is_constructible<Any&, void, void>::value, "Error"); |
| 647 |
static_assert(!std::is_constructible<nAny&, void, int>::value, "Error"); |
| 648 |
static_assert(!std::is_constructible<nAny&, void, void>::value, "Error"); |
| 649 |
static_assert(!std::is_constructible<FromArgs<>&, int, int>::value, "Error"); |
| 650 |
static_assert(!std::is_constructible<FromArgs<>&, void, int>::value, "Error"); |
| 651 |
static_assert(!std::is_constructible<FromArgs<>&, void, void>::value, "Error"); |
| 652 |
static_assert(!std::is_constructible<Abstract&, int, int>::value, "Error"); |
| 653 |
static_assert(!std::is_constructible<Abstract&, void, int>::value, "Error"); |
| 654 |
static_assert(!std::is_constructible<Abstract&, void, void>::value, "Error"); |
| 655 |
static_assert(!std::is_constructible<int(&)[1], int, int>::value, "Error"); |
| 656 |
static_assert(!std::is_constructible<int(&)[1], void, int>::value, "Error"); |
| 657 |
static_assert(!std::is_constructible<int(&)[1], void, void>::value, "Error"); |
| 658 |
|
| 659 |
static_assert(!std::is_constructible<void(), int, int>::value, "Error"); |
| 660 |
static_assert(!std::is_constructible<void(), void, int>::value, "Error"); |
| 661 |
static_assert(!std::is_constructible<void(), void, void>::value, "Error"); |
| 662 |
static_assert(!std::is_constructible<void(), void(), int>::value, "Error"); |
| 663 |
static_assert(!std::is_constructible<void(), void(), void()>::value, "Error"); |
| 664 |
|
| 665 |
static_assert(!std::is_constructible<void() const, int, int>::value, "Error"); |
| 666 |
static_assert(!std::is_constructible<void() const, void, int>::value, "Error"); |
| 667 |
static_assert(!std::is_constructible<void() const, void, void>::value, "Error"); |
| 668 |
static_assert(!std::is_constructible<void() const, void() volatile, |
| 669 |
int>::value, "Error"); |
| 670 |
static_assert(!std::is_constructible<void() const, void() volatile const, |
| 671 |
void() const>::value, "Error"); |
| 672 |
|
| 673 |
static_assert(!std::is_constructible<FromArgs<int>, int, int>::value, "Error"); |
| 674 |
static_assert(!std::is_constructible<const FromArgs<int>, int, int>::value, |
| 675 |
"Error"); |
| 676 |
static_assert(!std::is_constructible<FromArgs<int>, void, int>::value, "Error"); |
| 677 |
static_assert(!std::is_constructible<const FromArgs<int>, void, int>::value, |
| 678 |
"Error"); |
| 679 |
static_assert(!std::is_constructible<FromArgs<int, int>, void, int>::value, |
| 680 |
"Error"); |
| 681 |
static_assert(!std::is_constructible<const FromArgs<int, int>, void, |
| 682 |
int>::value, "Error"); |
| 683 |
|
| 684 |
static_assert(!std::is_constructible<DelDtor, int, B, U>::value, "Error"); |
| 685 |
static_assert(!std::is_constructible<const DelDtor, int, B, U>::value, "Error"); |
| 686 |
static_assert(!std::is_constructible<DelDtor, int>::value, "Error"); |
| 687 |
static_assert(!std::is_constructible<const DelDtor, int>::value, "Error"); |
| 688 |
static_assert(!std::is_constructible<DelDtor>::value, "Error"); |
| 689 |
static_assert(!std::is_constructible<const DelDtor>::value, "Error"); |
| 690 |
static_assert(!std::is_constructible<DelDtor, void*, void(&)()>::value, |
| 691 |
"Error"); |
| 692 |
static_assert(!std::is_constructible<const DelDtor, void*, void(&)()>::value, |
| 693 |
"Error"); |
| 694 |
|
| 695 |
static_assert(!std::is_constructible<AbstractDelDtor>::value, "Error"); |
| 696 |
static_assert(!std::is_constructible<const AbstractDelDtor>::value, "Error"); |
| 697 |
static_assert(!std::is_constructible<DelEllipsis>::value, "Error"); |
| 698 |
static_assert(!std::is_constructible<const DelEllipsis>::value, "Error"); |
| 699 |
static_assert(!std::is_constructible<DelEllipsis, double>::value, "Error"); |
| 700 |
static_assert(!std::is_constructible<const DelEllipsis, double>::value, |
| 701 |
"Error"); |
| 702 |
static_assert(!std::is_constructible<DelEllipsis, double, int&>::value, |
| 703 |
"Error"); |
| 704 |
static_assert(!std::is_constructible<const DelEllipsis, double, int&>::value, |
| 705 |
"Error"); |
| 706 |
static_assert(!std::is_constructible<DelnAny>::value, "Error"); |
| 707 |
static_assert(!std::is_constructible<const DelnAny>::value, "Error"); |
| 708 |
static_assert(!std::is_constructible<DelnAny, int>::value, "Error"); |
| 709 |
static_assert(!std::is_constructible<const DelnAny, int>::value, "Error"); |
| 710 |
static_assert(!std::is_constructible<DelnAny, int, void*>::value, "Error"); |
| 711 |
static_assert(!std::is_constructible<const DelnAny, int, void*>::value, |
| 712 |
"Error"); |
| 713 |
static_assert(!std::is_constructible<DelnAny, Empty, B, D>::value, "Error"); |
| 714 |
static_assert(!std::is_constructible<const DelnAny, Empty, B, D>::value, |
| 715 |
"Error"); |
| 716 |
|
| 717 |
// Deleted members in unions with non-trivial members: |
| 718 |
static_assert(!std::is_constructible<NontrivialUnion>::value, "Error"); |
| 719 |
static_assert(!std::is_constructible<NontrivialUnion, |
| 720 |
const NontrivialUnion&>::value, "Error"); |
| 721 |
|
| 722 |
// Unusual copy: |
| 723 |
static_assert(!std::is_constructible<UnusualCopy>::value, "Error"); |
| 724 |
static_assert(!std::is_constructible<UnusualCopy, UnusualCopy>::value, "Error"); |
| 725 |
static_assert(!std::is_constructible<UnusualCopy, |
| 726 |
UnusualCopy&&>::value, "Error"); |
| 727 |
static_assert(!std::is_constructible<UnusualCopy, |
| 728 |
const UnusualCopy&>::value, "Error"); |
| 729 |
static_assert(std::is_constructible<UnusualCopy, UnusualCopy&>::value, "Error"); |
| 730 |
|
| 731 |
static_assert(std::is_constructible<FromArgs<int, char>, |
| 732 |
int, char>::value, "Error"); |
| 733 |
static_assert(std::is_constructible<const FromArgs<int, char>, |
| 734 |
int, char>::value, "Error"); |
| 735 |
static_assert(std::is_constructible<FromArgs<int, char>, |
| 736 |
int, int>::value, "Error"); |
| 737 |
static_assert(std::is_constructible<const FromArgs<int, char>, |
| 738 |
int, int>::value, "Error"); |
| 739 |
static_assert(std::is_constructible<nAny, int, int>::value, "Error"); |
| 740 |
static_assert(std::is_constructible<const nAny, int, int>::value, "Error"); |
| 741 |
static_assert(std::is_constructible<FromArgs<int, char>, |
| 742 |
ImplicitTo<int>, ImplicitTo<char>>::value, "Error"); |
| 743 |
static_assert(std::is_constructible<const FromArgs<int, char>, |
| 744 |
ImplicitTo<int>, ImplicitTo<char>>::value, "Error"); |
| 745 |
static_assert(std::is_constructible<Ellipsis, int, char>::value, "Error"); |
| 746 |
static_assert(std::is_constructible<const Ellipsis, int, char>::value, "Error"); |
| 747 |
static_assert(std::is_constructible<Ellipsis, B, U, int&>::value, "Error"); |
| 748 |
static_assert(std::is_constructible<const Ellipsis, |
| 749 |
B, U, int&>::value, "Error"); |
| 750 |
static_assert(std::is_constructible<nAny, B, U, int&>::value, "Error"); |
| 751 |
static_assert(std::is_constructible<const nAny, B, U, int&>::value, "Error"); |
| 752 |
static_assert(std::is_constructible<FromArgs<std::initializer_list<int>, |
| 753 |
std::initializer_list<B>>, std::initializer_list<int>, |
| 754 |
std::initializer_list<B>>::value, "Error"); |
| 755 |
static_assert(std::is_constructible<const FromArgs<std::initializer_list<int>, |
| 756 |
std::initializer_list<B>>, std::initializer_list<int>, |
| 757 |
std::initializer_list<B>>::value, "Error"); |
| 758 |
static_assert(std::is_constructible<FromArgs<std::initializer_list<int>, |
| 759 |
std::initializer_list<B>>, std::initializer_list<int>&, |
| 760 |
std::initializer_list<B>&>::value, "Error"); |
| 761 |
static_assert(!std::is_constructible<FromArgs<std::initializer_list<int>&, |
| 762 |
std::initializer_list<B>&>, std::initializer_list<int>, |
| 763 |
std::initializer_list<B>>::value, "Error"); |
| 764 |
|
| 765 |
#if __cpp_aggregate_paren_init |
| 766 |
// In C++20 arrays can be initialized using parentheses. |
| 767 |
constexpr bool w = true; |
| 768 |
#else |
| 769 |
constexpr bool w = false; |
| 770 |
#endif |
| 771 |
|
| 772 |
static_assert(!std::is_constructible<FromArgs<std::initializer_list<int>>, |
| 773 |
int, int>::value, "Error"); |
| 774 |
static_assert(!std::is_constructible<const |
| 775 |
FromArgs<std::initializer_list<int>>, int, int>::value, "Error"); |
| 776 |
static_assert(w == std::is_constructible<B[2], B, B>::value, "Error"); |
| 777 |
static_assert(w == std::is_constructible<const B[2], B, B>::value, "Error"); |
| 778 |
static_assert(w == std::is_constructible<U[2], U, U>::value, "Error"); |
| 779 |
static_assert(w == std::is_constructible<const U[2], U, U>::value, "Error"); |
| 780 |
|
| 781 |
static_assert(!std::is_constructible<E, E, E>::value, "Error"); |
| 782 |
static_assert(!std::is_constructible<const E, E, E>::value, "Error"); |
| 783 |
static_assert(!std::is_constructible<SE, SE, SE>::value, "Error"); |
| 784 |
static_assert(!std::is_constructible<const SE, SE, SE>::value, "Error"); |
| 785 |
static_assert(!std::is_constructible<E, B, std::nullptr_t>::value, "Error"); |
| 786 |
static_assert(!std::is_constructible<const E, B, std::nullptr_t>::value, |
| 787 |
"Error"); |
| 788 |
static_assert(!std::is_constructible<SE, B, std::nullptr_t>::value, "Error"); |
| 789 |
static_assert(!std::is_constructible<const SE, B, std::nullptr_t>::value, |
| 790 |
"Error"); |
| 791 |
static_assert(!std::is_constructible<E, int[], int[]>::value, "Error"); |
| 792 |
static_assert(!std::is_constructible<const E, int[], int[]>::value, "Error"); |
| 793 |
static_assert(!std::is_constructible<SE, int[], int[]>::value, "Error"); |
| 794 |
static_assert(!std::is_constructible<const SE, int[], int[]>::value, "Error"); |
| 795 |
|
| 796 |
static_assert(!std::is_constructible<OpE, OpE, OpE>::value, "Error"); |
| 797 |
static_assert(!std::is_constructible<const OpE, OpE, OpE>::value, "Error"); |
| 798 |
static_assert(!std::is_constructible<OpSE, OpSE, OpSE>::value, "Error"); |
| 799 |
static_assert(!std::is_constructible<const OpSE, OpSE, OpSE>::value, "Error"); |
| 800 |
static_assert(!std::is_constructible<OpE, B, std::nullptr_t>::value, "Error"); |
| 801 |
static_assert(!std::is_constructible<const OpE, B, std::nullptr_t>::value, |
| 802 |
"Error"); |
| 803 |
static_assert(!std::is_constructible<OpSE, B, std::nullptr_t>::value, "Error"); |
| 804 |
static_assert(!std::is_constructible<const OpSE, B, std::nullptr_t>::value, |
| 805 |
"Error"); |
| 806 |
static_assert(!std::is_constructible<OpE, int[], int[]>::value, "Error"); |
| 807 |
static_assert(!std::is_constructible<const OpE, int[], int[]>::value, "Error"); |
| 808 |
static_assert(!std::is_constructible<OpSE, int[], int[]>::value, "Error"); |
| 809 |
static_assert(!std::is_constructible<const OpSE, int[], int[]>::value, "Error"); |
| 810 |
|
| 811 |
static_assert(!std::is_constructible<int[], int, int>::value, "Error"); |
| 812 |
static_assert(!std::is_constructible<const int[], int, int>::value, "Error"); |
| 813 |
|
| 814 |
static_assert(std::is_constructible<int&, ImplicitTo<int&>>::value, "Error"); |
| 815 |
static_assert(std::is_constructible<const int&, ImplicitTo<int&&>>::value, |
| 816 |
"Error"); |
| 817 |
static_assert(std::is_constructible<int&&, ImplicitTo<int&&>>::value, "Error"); |
| 818 |
static_assert(std::is_constructible<const int&, ImplicitTo<int>>::value, |
| 819 |
"Error"); |
| 820 |
|
| 821 |
static_assert(!std::is_constructible<const int&, ExplicitTo<int>>::value, |
| 822 |
"Error"); |
| 823 |
static_assert(!std::is_constructible<int&&, ExplicitTo<int>>::value, "Error"); |
| 824 |
|
| 825 |
// Binding through reference-compatible type is required to perform |
| 826 |
// direct-initialization as described in [over.match.ref] p. 1 b. 1: |
| 827 |
static_assert(std::is_constructible<int&, ExplicitTo<int&>>::value, "Error"); |
| 828 |
static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "Error"); |
| 829 |
|
| 830 |
// But an xvalue doesn't count for direct binding. |
| 831 |
static_assert(!std::is_constructible<const int&, ExplicitTo<int&&>>::value, |
| 832 |
"Error"); |
| 833 |
|
| 834 |
// Binding through temporary behaves like copy-initialization, |
| 835 |
// see [dcl.init.ref] p. 5, very last sub-bullet: |
| 836 |
static_assert(!std::is_constructible<const int&, ExplicitTo<double&&>>::value, |
| 837 |
"Error"); |
| 838 |
static_assert(!std::is_constructible<int&&, ExplicitTo<double&&>>::value, |
| 839 |
"Error"); |
| 840 |
|
| 841 |
static_assert(std::is_constructible<void(&&)(), void(&)()>::value, "Error"); |