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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [auto14.C] - Rev 707

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

// PR c++/40306, c++/40307
// { dg-options "-std=c++0x" }
// { dg-do run }

template< typename T >
struct test {
   test run() {
      auto tmp = *this;
      return tmp;
   }
   test run_pass() {
      test tmp( *this );
      return tmp;
   }

   test run_fail() {
      auto tmp( *this );
      return tmp;
   }
};

int main()
{
   test<int> x;
   x.run();
   x.run_pass();
   x.run_fail();
   return 0;
}

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

powered by: WebSVN 2.1.0

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