gcc/testsuite/g++.dg/cpp0x/ref-qual21.C
raw| 1 | // PR c++/104173 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct QString { |
| 5 | QString toLower() &&; |
| 6 | }; |
| 7 | |
| 8 | struct QCoreApplication { |
| 9 | static QString applicationName(); |
| 10 | }; |
| 11 | |
| 12 | QCoreApplication* instance(); |
| 13 | |
| 14 | void f() { |
| 15 | instance()->applicationName().toLower(); |
| 16 | } |
| 17 | |
| 18 | template<class...> |
| 19 | void g() { |
| 20 | instance()->applicationName().toLower(); |
| 21 | } |
| 22 | |
| 23 | template void g<>(); |