confusing error-message

Martin R. martinliebtdich@hotmail.com
Mon Jul 3 09:39:00 GMT 2006


Hi,
the following code:

struct S
{
    void f(int x) {}
};

int main()
{
    S s;
    s.f(3);
}

would produce:

error: no matching function for call to 'S::f(int)'
note: candidates are: void S::f(int&)

but should be something like "trying to convert non-variable to 
reference"...

Regards,
Martin



More information about the Gcc-bugs mailing list