OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [other/] [ptrmem10.C] - Diff between revs 301 and 384

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);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.