Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
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