blob: 064c2f2f6204c14a9c576e26ebaad3cb170f4d87 (
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(...); // { dg-error "operator*" }
typedef decltype(get<T>(declval<T>())) type; // { dg-error "no match" }
};
struct X { };
S<X>::type x;
// { dg-prune-output "note" }
|