OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [other/] [ptrmem10.C] - Blame information for rev 315

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Contributed by Dodji Seketeli 
2
// Origin PR c++/37093
3
 
4
template 
5
static
6
void foo(void *obj)
7
{
8
  C *p = static_cast(obj);
9
  (p->*M)();
10
}
11
 
12
template 
13
static void
14
bar(C *c, void (C::*m) ())
15
{
16
  foo((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun)" }
17
}
18
 
19
struct S
20
{
21
  void baz () {}
22
};
23
 
24
int
25
main ()
26
{
27
  S a;
28
  bar(&a, &S::baz);
29
}

powered by: WebSVN 2.1.0

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