gcc/testsuite/g++.dg/cpp0x/decltype32.C
raw| 1 | // PR c++/50075 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "-ftemplate-depth=10" } |
| 4 | |
| 5 | template <typename T> |
| 6 | auto make_array(const T& il) -> |
| 7 | decltype(make_array(il)) // { dg-error "not declared|no matching|depth" } |
| 8 | { } |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | int z = make_array(1); // { dg-error "no matching" } |
| 13 | } |
| 14 | |
| 15 | // { dg-prune-output "compilation terminated" } |