gcc/testsuite/g++.dg/cpp0x/ref-qual18.C
raw| 1 | // PR c++/71784 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename T> struct A { |
| 5 | template<typename U> void f(U const&) & { } |
| 6 | template<typename U> void f(U const&) && { } |
| 7 | }; |
| 8 | |
| 9 | template void A<int>::f<int>(int const&) &; |
| 10 | template void A<float>::f<int>(int const&) &&; |
| 11 | |
| 12 | template<typename T> struct B { |
| 13 | void f(int const&) & { } |
| 14 | void f(int const&) && { } |
| 15 | }; |
| 16 | |
| 17 | template void B<int>::f(int const&) &; |
| 18 | template void B<float>::f(int const&) &&; |