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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [pr33996.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-options "-std=c++0x" }
2
 
3
#define BUG
4
struct type
5
{
6
  type() { }
7
  type(const type&) { }
8
 
9
private:
10
  type(type&&);
11
};
12
 
13
template
14
  struct identity
15
  {
16
    typedef _Tp type;
17
  };
18
 
19
template
20
  inline _Tp&&
21
  forward(typename identity<_Tp>::type&& __t)
22
  { return __t; }
23
 
24
struct vec
25
{
26
  template
27
    void
28
    bar(_Args&& __args)
29
#ifdef BUG
30
    ;
31
#else
32
    {
33
      type(forward<_Args>(__args));
34
    }
35
#endif
36
};
37
 
38
#ifdef BUG
39
template
40
  void
41
  vec::bar(_Args&& __args)
42
  {
43
    type(forward<_Args>(__args));
44
  }
45
#endif
46
 
47
int main()
48
{
49
  vec v;
50
  type c;
51
  v.bar(c);
52
}

powered by: WebSVN 2.1.0

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