blob: 29a1cddab16f553ccda9e10d3ce16a4fde2e8c65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// PR c++/49156
// { dg-options -std=c++0x }
template<typename T> T declval();
template<typename T>
struct S {
template<typename U>
static U get(const volatile T&);
template<typename U>
static decltype(*declval<U>()) get(...);
typedef decltype(get<T>(declval<T>())) type; // { dg-error "no match" }
};
struct X { };
S<X>::type x;
// { dg-prune-output "note" }
|