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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// Test that a base with only a move constructor causes the implicit copy
// constructor to be deleted.
// { dg-options "-std=c++0x" }

struct A                        // { dg-message "declares a move" }
{
  A();
  A(A&&);
};

struct B: A                     // { dg-error "use of deleted" }
{
};

int main()
{
  B b1;
  B b2(b1);                 // { dg-error "deleted function .B::B.const" }
  B b3(static_cast<B&&>(b1));
}

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.