Commit 95d5a781 by Robert Lipe

Changes from Alexandre and Klaus-Georg.

From-SVN: r20820
parent 4a6443a1
// Build don't link // Build don't link
// The call to a::foo() generates an error:
// eb131.C: In method `a::a()':
// eb131.C:26: no matching function for call to `a::foo (void (a::*)(double))'
// eb131.C:15: candidates are: a::foo(void (a::*)(float))
// According to [over.over] in the CD2, &junk should resolve in this context.
// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> // From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
// Reported against EGCS snaps 98/06/18. // Reported against EGCS snaps 98/06/18.
struct a { struct a {
a(); a();
void junk(); void junk( float );
void junk( int ); void junk( double );
void junk( float );
void junk( double );
void foo( void (a::*member)(float) ); void bar( double );
void bar( void (*function)(float) ); void bar( float );
};
void baz(); void foo( void (a::*member)(float) );
void baz( int ); };
void baz( float );
void baz( double );
a::a() a::a()
{ {
foo( &junk ); foo( &junk ); // ERROR: junk is an unqualified-id.
bar( &baz ); foo( &bar ); // ERROR: bar is an unqualified-id.
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment