Debian Codegraph @

gcc/testsuite/g++.dg/DRs/dr2137-2.C

raw
1 // DR 2137
2 // { dg-do link { target c++11 } }
3
4 // Test that copying Q is better than converting to R.
5
6 struct Q {
7 Q() { }
8 Q(const Q&) { }
9 };
10
11 struct R {
12 R(const Q&);
13 };
14
15 void f(Q) { }
16 void f(R);
17
18 int main()
19 {
20 f({Q()});
21 }