repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* MAINTAINERS: Add a note that maintainership also includes web
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr33589-1.C
blob
eea89f421a577f7db84c24392d9a443d821cbddd
1
// { dg-do compile }
2
struct base { void somemethod() {} };
3
struct derived : public base { };
4
5
struct smartpointer
6
{
7
~smartpointer() { }
8
operator derived*() const
9
{
10
return 0;
11
}
12
};
13
typedef void ( derived::* methodptr_type )();
14
methodptr_type getmemberptr()
15
{
16
return &derived::somemethod;
17
}
18
void somefunction()
19
{
20
smartpointer pObj;
21
( pObj->*getmemberptr() )();
22
}