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/] [defaulted15.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/38796
2
// { dg-options -std=c++0x }
3
 
4
struct A
5
{
6
  A (int);
7
  A (const A& = 1) = default;   // { dg-error "default argument" }
8
  void operator= (const A&) = default; // { dg-error "defaulted|match" }
9
};
10
 
11
struct B
12
{
13
private:
14
  B() = default;                // { dg-error "access" }
15
};
16
 
17
struct C
18
{
19
protected:
20
  ~C() = default;               // { dg-error "access" }
21
};
22
 
23
struct D
24
{
25
private:
26
  D& operator= (const D&) = default; // { dg-error "access" }
27
};
28
 
29
struct E
30
{
31
  explicit E (const E&) = default; // { dg-error "explicit" }
32
};
33
 
34
struct F
35
{
36
  F(F&) = default;          // { dg-error "non-const" }
37
};
38
 
39
struct G: public F
40
{
41
  // Can't be const because F copy ctor isn't.
42
  G(const G&) = default;    // { dg-error "const" }
43
};
44
 
45
struct H
46
{
47
  virtual ~H() = default;       // { dg-error "declared virtual" }
48
};

powered by: WebSVN 2.1.0

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