OSDN Git Service

PR c++/51107
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / error4.C
1 // PR c++/49156
2 // { dg-options -std=c++0x }
3
4 template<typename T> T declval();
5
6 template<typename T>
7 struct S {
8
9   template<typename U>
10     static U get(const volatile T&);
11
12   template<typename U>
13     static decltype(*declval<U>()) get(...); // { dg-error "operator*" }
14
15   typedef decltype(get<T>(declval<T>())) type; // { dg-error "no match" }
16 };
17
18 struct X { };
19
20 S<X>::type x;
21
22 // { dg-prune-output "note" }