gcc/testsuite/g++.dg/cpp0x/defaulted36.C
raw| 1 | // PR c++/53733 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename T> |
| 5 | struct wrap |
| 6 | { |
| 7 | wrap() = default; |
| 8 | wrap(wrap&&) = default; // Line 5 |
| 9 | wrap(const wrap&) = default; |
| 10 | |
| 11 | T t; |
| 12 | }; |
| 13 | |
| 14 | struct S { |
| 15 | S() = default; |
| 16 | S(const S&){} |
| 17 | S(S&&) = default; |
| 18 | }; |
| 19 | |
| 20 | typedef wrap<const S> W; |
| 21 | |
| 22 | W get() { return W(); } // Line 19 |
| 23 | |
| 24 | int main() {} |