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] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test that a base with only a move constructor causes the implicit copy
2
// constructor to be deleted.
3
// { dg-options "-std=c++0x" }
4
 
5
struct A                        // { dg-message "declares a move" }
6
{
7
  A();
8
  A(A&&);
9
};
10
 
11
struct B: A                     // { dg-error "use of deleted" }
12
{
13
};
14
 
15
int main()
16
{
17
  B b1;
18
  B b2(b1);                 // { dg-error "deleted function .B::B.const" }
19
  B b3(static_cast(b1));
20
}

powered by: WebSVN 2.1.0

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