not having a compiler atm xD
(edited the question above)
EDIT:
http://www.compileonline.com/compile_cpp_online.php
main.cpp:21:10: error: 'void myClass::foobar(float)' cannot be overloaded
main.cpp:14:13: error: with 'myClass myClass::foobar(float)'
Code:
#include <iostream>
bool foobar( float x )
{
std::cout << "" << std::endl;
return true;
}
class myClass
{
public:
myClass foobar( float x )
{
std::cout << "myClass foobar()" << std::endl;
return myClass();
}
void foobar( float x )
{
std::cout << "void foobar()" << std::endl;
}
};
int main( int argC , char* args[] )
{
myClass c1 , c2 , c3;
foobar( 0.0f );
c1.foobar( 0.0f );
c2 = c3.foobar( 0.0f );
}