* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr53223.C
blobb6ccd502d16220eb761760fb24d545343da52ad3
1 // PR c++/53223
2 // { dg-do compile { target c++11 } }
4 #include <type_traits>
6 #define SA(x) static_assert ((x), #x)
8 struct A
10   int good() const;
11   int operator *() const;
12   int operator ++() const;
13   int operator [](int) const;
16 int operator-- (const A&);
18 template<typename T>
19 void func(T t)
21   A x;
22   auto &&g1 = x.good();
23   auto &&g2 = x.operator*();
24   auto &&error1 = *x;
25   auto &&error2 = ++x;
26   auto &&error3 = --x;
27   auto &&error4 = x[5];
28   SA ((std::is_same<int &&, decltype (error1)>::value));
29   SA ((std::is_same<int &&, decltype (error2)>::value));
30   SA ((std::is_same<int &&, decltype (error3)>::value));
31   SA ((std::is_same<int &&, decltype (error4)>::value));
34 void func2(int)
36   A x;
37   auto &&g = *x;
40 int main()
42   func(0);
43   func2(0);