URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do compile }
|
// { dg-do compile }
|
// Origin: Giovanni Bajo
|
// Origin: Giovanni Bajo
|
// DR152: explicit copy constructors
|
// DR152: explicit copy constructors
|
|
|
namespace N1 {
|
namespace N1 {
|
struct X {
|
struct X {
|
X();
|
X();
|
explicit X(const X&);
|
explicit X(const X&);
|
};
|
};
|
void f(X);
|
void f(X);
|
int foo()
|
int foo()
|
{
|
{
|
X x;
|
X x;
|
f(x); // { dg-error "" "" }
|
f(x); // { dg-error "" "" }
|
}
|
}
|
}
|
}
|
|
|
namespace N2 {
|
namespace N2 {
|
template
|
template
|
struct X {
|
struct X {
|
X();
|
X();
|
explicit X(const X&);
|
explicit X(const X&);
|
};
|
};
|
|
|
template
|
template
|
void f(T ) {}
|
void f(T ) {}
|
|
|
template
|
template
|
int foo()
|
int foo()
|
{
|
{
|
X x;
|
X x;
|
N2::f(x); // { dg-error "" "" }
|
N2::f(x); // { dg-error "" "" }
|
}
|
}
|
|
|
template int foo(); // { dg-error "instantiated from here" }
|
template int foo(); // { dg-error "instantiated from here" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.