Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/depr-copy4.C

raw
1 // PR c++/94492
2 // { dg-additional-options -Wdeprecated-copy }
3
4 #pragma GCC diagnostic push
5 #pragma GCC diagnostic ignored "-Wdeprecated-copy"
6 struct expr
7 {
8 int a, b;
9 expr& operator=(const expr&) { return *this; }
10 };
11 #pragma GCC diagnostic pop
12
13 expr foo(expr e)
14 {
15 return e;
16 }