This code compiles (Using GCC / C++11):
void doStuff_HELPER(int a) { /**/ }
class SomeClass{
public:
void doStuff() {doStuff_HELPER( 10);}
};
This doesn't:
void doStuff(int a) { /**/ }
class SomeClass{
public:
void doStuff() {doStuff( 10);}
};
It doesn't say it's ambiguous or it can't be overloaded or anything it just says: "no matching function SomeClass::doStuff(int)", "candidate: void SomeClass::doStuff()". Is this the correct behavior? What does the standard say about this?
(Also, what is the best practice for such helper functions? Should they be put into a separate namespace maybe?)