Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/overload-conv-4.C

raw
1 // PR c++/90998 - ICE with copy elision in init by ctor and -Wconversion.
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wconversion" }
4
5 struct B;
6
7 struct A {
8 operator B();
9 };
10
11 struct B {
12 B(A const &rs);
13 B(B const &rs);
14 };
15
16 B
17 f (A x)
18 {
19 // C++14: we call B::B(A const &)
20 // C++17: now the same
21 return B(x);
22 }