* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae47.C
blob1058a2864c33e9dfdca89453c96a5cf686175506
1 // Source: Comment 16 of PR51213
2 // { dg-do compile { target c++11 } }
4 template <class T>
5 T && declval();
7 template <class T>
8 constexpr auto hasSize(int) -> decltype(declval<T&>().size(), bool())
9 { return true; }
11 template <class T>
12 constexpr bool hasSize(...)
13 { return false; }
15 struct A
17   int size();
20 struct B : private A
24 static_assert(hasSize<A>(0),  "A");
25 static_assert(!hasSize<B>(0), "B");