Debian Codegraph @

gcc/testsuite/g++.dg/ext/is_constructible5.C

raw
1 // PR c++/94149 - make __is_constructible work with paren-init of aggrs.
2 // { dg-do compile { target c++11 } }
3
4 struct S { };
5
6 struct W {
7 S& r;
8 W(S& r_) : r(r_) {}
9 operator S&() { return r; }
10 };
11
12 S s;
13 W w(s);
14 S& s2(w);
15
16 static_assert(__is_constructible(S&, W), "");