blob: 975a330b9bd6a886e961277ed4d5d54f2185c349 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// PR c++/71495
// { dg-do compile { target c++11 } }
struct A;
template <class T> void f(T); // { dg-bogus "initializing" }
template <class T> T&& declval();
struct B
{
template <class T, class U> static decltype(f<T>(declval<U>())) g(int);
template <class T, class U> void g(...);
} b;
int main()
{
b.g<A,A>(42);
}
|