* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype39.C
blob4676d2de9b5810517f6ea40dd8b5b189c7e2438c
1 // PR c++/53788
2 // { dg-do compile { target c++11 } }
4 struct t { static const bool value = true; };
5 struct f { static const bool value = false; };
7 template<typename T>
8 struct has_static {
9   template<typename X>
10   static t check(X*, decltype(T::fun())* = 0); // { dg-error "without object" }
11   static f check(...);
13   typedef decltype(check((T*)(0))) ret;
14   static const bool value = ret::value;
17 struct test { int fun() { return 0; } };
19 bool b = has_static<test>::value;