mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-27 21:15:20 +08:00
new
From-SVN: r23188
This commit is contained in:
parent
1590ea76e9
commit
ea4d3ff6e0
21
gcc/testsuite/g++.old-deja/g++.other/lookup4.C
Normal file
21
gcc/testsuite/g++.old-deja/g++.other/lookup4.C
Normal file
@ -0,0 +1,21 @@
|
||||
// Test for proper handling of references to overloaded member functions.
|
||||
|
||||
struct A {
|
||||
static void f (int) { }
|
||||
void f ();
|
||||
};
|
||||
|
||||
void (*p)(int) = &A::f;
|
||||
|
||||
void A::f ()
|
||||
{
|
||||
p = f;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
p = &a.f;
|
||||
(a.f)();
|
||||
(a.f)(42);
|
||||
}
|
Loading…
Reference in New Issue
Block a user