bool tas4 = __has_trivial_assign(void); bool tas5 = __has_trivial_assign(const void); bool nco1 = __has_nothrow_constructor(I); // { dg-error "incomplete type" } bool nco2 = __has_nothrow_constructor(C[]); bool nco3 = __has_nothrow_constructor(I[]); // { dg-error "incomplete type" } bool nco4 = __has_nothrow_constructor(void); bool nco5 = __has_nothrow_constructor(const void); bool tco1 = __has_trivial_constructor(I); // { dg-error "incomplete type" } bool tco2 = __has_trivial_constructor(C[]); bool tco3 = __has_trivial_constructor(I[]); // { dg-error "incomplete type" } bool tco4 = __has_trivial_constructor(void); bool tco5 = __has_trivial_constructor(const void); bool ncp1 = __has_nothrow_copy(I); // { dg-error "incomplete type" } bool ncp2 = __has_nothrow_copy(C[]); bool ncp3 = __has_nothrow_copy(I[]); // { dg-error "incomplete type" } bool ncp4 = __has_nothrow_copy(void); bool ncp5 = __has_nothrow_copy(const void); bool tcp1 = __has_trivial_copy(I); // { dg-error "incomplete type" } bool tcp2 = __has_trivial_copy(C[]); bool tcp3 = __has_trivial_copy(I[]); // { dg-error "incomplete type" } bool tcp4 = __has_trivial_copy(void); bool tcp5 = __has_trivial_copy(const void); bool vde1 = __has_virtual_destructor(I); // { dg-error "incomplete type" } bool vde2 = __has_virtual_destructor(C[]); bool vde3 = __has_virtual_destructor(I[]); // { dg-error "incomplete type" } bool vde4 = __has_virtual_destructor(void);
int main () { assert (__has_nothrow_copy (S) == f ()); }
bool f () { return __has_nothrow_copy (S); }
concept bool Nothrow_copyable() { return __has_nothrow_copy(T); }