Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
rv-cast5.C
blob: 5233078f7b4a7a34fd8bb8577f8d6ba8b676b15f [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
template
<
typename
T
>
struct
hold
{
T value
;
constexpr
T
&&
operator
()()
&&
{
return
static_cast
<
T
&&>(
value
);
}
};
int
main
()
{
hold
<
bool
&&>{
static_cast
<bool>
(
42
)}();
}