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 |
// Contributed by Dodji Seketeli
|
// Contributed by Dodji Seketeli
|
// Origin PR c++/37093
|
// Origin PR c++/37093
|
|
|
template
|
template
|
static
|
static
|
void foo(void *obj)
|
void foo(void *obj)
|
{
|
{
|
C *p = static_cast(obj);
|
C *p = static_cast(obj);
|
(p->*M)();
|
(p->*M)();
|
}
|
}
|
|
|
template
|
template
|
static void
|
static void
|
bar(C *c, void (C::*m) ())
|
bar(C *c, void (C::*m) ())
|
{
|
{
|
foo((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun)" }
|
foo((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun)" }
|
}
|
}
|
|
|
struct S
|
struct S
|
{
|
{
|
void baz () {}
|
void baz () {}
|
};
|
};
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
S a;
|
S a;
|
bar(&a, &S::baz);
|
bar(&a, &S::baz);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.