What type does the someFunction function take in it's parameters?
What type does MyObject.getWhatIWant() return?
Is MyObject a variable name or a type?
What do you mean by "...having no access to someFunction"?
This gives the compiler a lot of easily abused superpowers, so you typically don't want to do it this way. It is better to be explicit (using the named member function) or to overload the function itself as instructed for you.
I did try overloading operator(), as I mentioned in the OP, but doing someFunction(myClass()); is different to someFunction(myClass);
@JewelCpp
I would have to create lots of different kinds of functions for it to be seamless, and even so any user-defined functions would not be affected, so it's not a solution for me.
Here's a better explanation:
someFunction is void someFunction(RawClass&);
WrapperClass.get() is RawClass& WrapperClass::get() {return m_rawClassObject;}
At the moment, I'm doing this: someFunction(WrapperClass.get());
what I want is this: someFunction(WrapperClass);
without modifying someFunction to overload it (it's not practical)