OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [range-for20.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/49834
2
// PR c++/50020
3
// { dg-options -std=c++0x }
4
 
5
struct A
6
{
7
  template  T get_value() const;
8
};
9
 
10
struct B {
11
  A first, second;
12
};
13
 
14
struct C
15
{
16
  B* begin() const;
17
  B* end() const;
18
};
19
 
20
template 
21
struct D
22
{
23
  Ret f(const C &p)
24
  {
25
    for (const B &i: p)         // OK
26
      i.second.get_value();
27
    for (const auto &i: p)      // ERROR
28
      i.second.get_value();
29
    return Ret(0);
30
  }
31
};
32
 
33
void g()
34
{
35
  D().f(C());
36
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.