Commit 6c9ef6d4 by Jason Merrill

new

From-SVN: r26816
parent a359be75
// Test for implicit & on methods.
// Contributed by Jason Merrill <jason@cygnus.com>.
// Special g++ Options: -fpermissive -w
struct A {
void f (int = 0) { }
};
int
main ()
{
void (A::*p)(int) = 0;
p = A::f;
if (p != A::f)
return 1;
}
// Test for overload resolution in comparison expressions.
// Contributed by Jason Merrill <jason@cygnus.com>.
// Special g++ Options: -fpermissive -w
void f (int) { }
void f ();
int main () {
void (*p)(int);
p = f;
if (p != f)
return 1;
}
...@@ -11,7 +11,7 @@ typedef void (A::*handler) (X*); ...@@ -11,7 +11,7 @@ typedef void (A::*handler) (X*);
class B { class B {
public: public:
void setHandler(handler); // ERROR - fn ref in err msg void setHandler(handler);
}; };
void f(B* b) { void f(B* b) {
......
// Test that default args don't mess up pmf type comparisons.
// Contributed by Jason Merrill <jason@cygnus.com>.
struct A {
void f (int = 0) { }
};
int
main ()
{
void (A::*p)(int) = 0;
p = &A::f;
if (p != &A::f)
return 1;
}
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