URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do compile }
|
// { dg-do compile }
|
// Contributed by Martin Loewis
|
// Contributed by Martin Loewis
|
// PR c++/8856: Make sure template conversion operators are not parsed as
|
// PR c++/8856: Make sure template conversion operators are not parsed as
|
// template names.
|
// template names.
|
|
|
struct K {};
|
struct K {};
|
template struct K2 {};
|
template struct K2 {};
|
|
|
template struct A {
|
template struct A {
|
template operator U() { return U(); }
|
template operator U() { return U(); }
|
};
|
};
|
|
|
int main() {
|
int main() {
|
A a;
|
A a;
|
|
|
(void)a.operator int();
|
(void)a.operator int();
|
(void)a.operator double();
|
(void)a.operator double();
|
(void)a.operator K2();
|
(void)a.operator K2();
|
(void)a.A::operator int();
|
(void)a.A::operator int();
|
(void)a.A::operator double();
|
(void)a.A::operator double();
|
(void)a.A::operator K2();
|
(void)a.A::operator K2();
|
|
|
(void)a.operator double(); // { dg-error "not a template" }
|
(void)a.operator double(); // { dg-error "not a template" }
|
(void)a.operator K(); // { dg-error "not a template" }
|
(void)a.operator K(); // { dg-error "not a template" }
|
(void)a.A::operator double(); // { dg-error "not a template" }
|
(void)a.A::operator double(); // { dg-error "not a template" }
|
(void)a.A::operator K(); // { dg-error "not a template" }
|
(void)a.A::operator K(); // { dg-error "not a template" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.