URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
// Copyright (C) 2003 Free Software Foundation
|
// Copyright (C) 2003 Free Software Foundation
|
// Contributed by Kriang Lerdsuwanakij
|
// Contributed by Kriang Lerdsuwanakij
|
|
|
// Member function of class template as friend
|
// Member function of class template as friend
|
// Erroneous case: mismatch during declaration
|
// Erroneous case: mismatch during declaration
|
|
|
template struct A {
|
template struct A {
|
template void f(U); // { dg-error "candidate" }
|
template void f(U); // { dg-error "candidate" }
|
void g(); // { dg-error "candidate" }
|
void g(); // { dg-error "candidate" }
|
void h(); // { dg-error "candidate" }
|
void h(); // { dg-error "candidate" }
|
void i(int); // { dg-error "candidate" }
|
void i(int); // { dg-error "candidate" }
|
};
|
};
|
|
|
class C {
|
class C {
|
int ii;
|
int ii;
|
template friend void A::f(U); // { dg-error "not match" }
|
template friend void A::f(U); // { dg-error "not match" }
|
template template
|
template template
|
friend void A::g(); // { dg-error "not match" }
|
friend void A::g(); // { dg-error "not match" }
|
template friend int A::h(); // { dg-error "not match" }
|
template friend int A::h(); // { dg-error "not match" }
|
template friend void A::i(char); // { dg-error "not match" }
|
template friend void A::i(char); // { dg-error "not match" }
|
};
|
};
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.