Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
DRs
/
dr1778.C
blob: 8db937fc0bf211c7678c370f6952cfaaddf1095b [
file
] [
log
] [
blame
]
// P1286R2: Contra CWG1778
// { dg-do compile { target c++11 } }
struct
T
{
T
();
T
(
T
&&)
noexcept
(
false
);
};
struct
U
{
T t
;
U
();
U
(
U
&&)
noexcept
=
default
;
};
U u1
;
U u2
=
static_cast
<
U
&&>(
u1
);
// OK, calls std::terminate if T::T(T&&) throws