gcc/testsuite/g++.dg/cpp0x/decltype80.C
raw| 1 | // PR c++/85493 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct no_def { |
| 5 | no_def() = delete; |
| 6 | }; |
| 7 | |
| 8 | template<class...> |
| 9 | int foo() = delete; |
| 10 | |
| 11 | template<class> |
| 12 | void test() { |
| 13 | decltype(no_def()) a1; // { dg-error "deleted" } |
| 14 | decltype(no_def(1,2,3)) a2; // { dg-error "no match" } |
| 15 | decltype(foo<>()) a3; // { dg-error "deleted" } |
| 16 | } |