Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
Wnarrowing14.C
blob: 1aa22196f336485aa662adebdd615dfa6df56112 [
file
] [
log
] [
blame
]
// PR c++/78244
// { dg-do compile { target c++11 } }
using
Number
=
unsigned
int
;
template
<int>
struct
S
{
S
()
{
const
Number
x
=
{-
1
};
// { dg-error "narrowing conversion" }
(
void
)
x
;
}
};
int
main
()
{
S
<
1
>
s
;
}