| 1 |
// PR c++/107461 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
int f(...); |
| 5 |
template<class T> decltype(T() + f(0)) g(); // #1 |
| 6 |
|
| 7 |
char f(int); |
| 8 |
template<class T> decltype(T() + f(0)) g(); // #2, distinct from #1 |
| 9 |
|
| 10 |
int main() { |
| 11 |
g<int>(); // { dg-error "ambiguous" } |
| 12 |
} |