gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | // Test user-defined literals. |
| 4 | // Test error on non-function declaration. |
| 5 | |
| 6 | double operator ""_baddecl; // { dg-error "8:declaration of .operator\"\"_baddecl. as non-function" } |
| 7 | |
| 8 | template<char...> |
| 9 | int operator ""_badtmpldecl; // { dg-error "7:declaration of .operator\"\"_badtmpldecl. as non-function" } |