URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// PR c++/38796
|
// PR c++/38796
|
// { dg-options -std=c++0x }
|
// { dg-options -std=c++0x }
|
|
|
struct A
|
struct A
|
{
|
{
|
A (int);
|
A (int);
|
A (const A& = 1) = default; // { dg-error "default argument" }
|
A (const A& = 1) = default; // { dg-error "default argument" }
|
void operator= (const A&) = default; // { dg-error "defaulted|match" }
|
void operator= (const A&) = default; // { dg-error "defaulted|match" }
|
};
|
};
|
|
|
struct B
|
struct B
|
{
|
{
|
private:
|
private:
|
B() = default; // { dg-error "access" }
|
B() = default; // { dg-error "access" }
|
};
|
};
|
|
|
struct C
|
struct C
|
{
|
{
|
protected:
|
protected:
|
~C() = default; // { dg-error "access" }
|
~C() = default; // { dg-error "access" }
|
};
|
};
|
|
|
struct D
|
struct D
|
{
|
{
|
private:
|
private:
|
D& operator= (const D&) = default; // { dg-error "access" }
|
D& operator= (const D&) = default; // { dg-error "access" }
|
};
|
};
|
|
|
struct E
|
struct E
|
{
|
{
|
explicit E (const E&) = default; // { dg-error "explicit" }
|
explicit E (const E&) = default; // { dg-error "explicit" }
|
};
|
};
|
|
|
struct F
|
struct F
|
{
|
{
|
F(F&) = default; // { dg-error "non-const" }
|
F(F&) = default; // { dg-error "non-const" }
|
};
|
};
|
|
|
struct G: public F
|
struct G: public F
|
{
|
{
|
// Can't be const because F copy ctor isn't.
|
// Can't be const because F copy ctor isn't.
|
G(const G&) = default; // { dg-error "const" }
|
G(const G&) = default; // { dg-error "const" }
|
};
|
};
|
|
|
struct H
|
struct H
|
{
|
{
|
virtual ~H() = default; // { dg-error "declared virtual" }
|
virtual ~H() = default; // { dg-error "declared virtual" }
|
};
|
};
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.