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/] [named.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-options "--std=c++0x" }
// { dg-options "--std=c++0x" }
// { dg-do link }
// { dg-do link }
template
template
inline _Tp&&
inline _Tp&&
movel(_Tp& __t)
movel(_Tp& __t)
{ return static_cast<_Tp&&>(__t); }
{ return static_cast<_Tp&&>(__t); }
struct S {};
struct S {};
struct T
struct T
{
{
  T(S && s_) : s(movel(s_)) {}
  T(S && s_) : s(movel(s_)) {}
  S && get() { return movel(s); }
  S && get() { return movel(s); }
  operator S&&() { return movel(s); }
  operator S&&() { return movel(s); }
  S && s;
  S && s;
};
};
void named(S const &) {}
void named(S const &) {}
void named(S&&);
void named(S&&);
void unnamed(S const &);
void unnamed(S const &);
void unnamed(S&&) {}
void unnamed(S&&) {}
void f(S && p)
void f(S && p)
{
{
  S && s(movel(p));
  S && s(movel(p));
  T t(movel(s));
  T t(movel(s));
  named(s);                          // variable reference
  named(s);                          // variable reference
  named(p);                          // parameter reference
  named(p);                          // parameter reference
  named(t.s);                        // class member access
  named(t.s);                        // class member access
  unnamed(t.get());                  // function return
  unnamed(t.get());                  // function return
  unnamed(t);                        // implicit conversion
  unnamed(t);                        // implicit conversion
  unnamed(static_cast(s));      // cast to rvalue
  unnamed(static_cast(s));      // cast to rvalue
}
}
int main()
int main()
{
{
}
}
 
 

powered by: WebSVN 2.1.0

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