* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr51547.C
blob578a799e7f84e5983092dbd903f751c6ee22d8a4
1 // PR c++/51547
2 // { dg-do compile { target c++11 } }
4 template <class T>
5 struct vector
7   T*
8   begin()
9   { return &member; }
11   const T*
12   begin() const
13   { return &member; }
15   T member;
18 struct Bar {
19   int x;
22 struct Foo {
23   const vector<Bar>& bar() const {
24     return bar_;
25   }
27   vector<Bar> bar_;
30 template <class X>
31 struct Y {
32   void foo() {
33     Foo a;
34     auto b = a.bar().begin();
35     auto&& c = b->x;
36   }
39 template <class X>
40 void foo() {
41   Foo a;
42   auto b = a.bar().begin();
43   auto&& c = b->x;
46 int main() {
47   Y<int> p;
48   p.foo();
49   foo<int>();