Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
explicit4.C
blob: 065a473854d42a99821bef638d0159498e572009 [
file
] [
log
] [
blame
]
// Negative explicit conv test.
// { dg-do compile { target c++11 } }
struct
A
{
A
(
const
A
&,
int
=
0
);
// { dg-message "note" }
};
struct
B
{
explicit
operator
A
();
};
int
main
()
{
B b
;
(
A
(
b
));
// OK
(
A
(
b
,
1
));
// { dg-error "cannot convert" }
}