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 774
Go to most recent revision | 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));
}
Go to most recent revision | Compare with Previous | Blame | View Log