* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae29.C
blob8792778acf8eea816efcae8506dc7a4b8d5b1d09
1 // PR c++/51047
2 // { dg-do compile { target c++11 } }
4 template<typename T> T &&declval();
5 template<class T> decltype(declval<T>().x) f(T *);
6 template<class T> char f(T);
7 struct B1{ int x; };
8 struct B2{ int x; };
9 struct D : public B1, B2{};
10 struct S { int x; };
11 int main()
13   S *p = nullptr;
14   static_assert(sizeof(f(p)) == sizeof(int), "");
15   D *q = nullptr;
16   static_assert(sizeof(f(q)) == 1u, "");