This is a recurrent problem once again. Someone know a easy way to do that? Imagine I have the following:
class Base
{
    public:
        ...
        Base property(const std::string& name)=0;
};
class Derived:public Base
{
    public:
        Derived();
        Derived(const Derived&& val);
        Base property(const std::string& name)
        {
            Derived z;
            return z;
        }
 }
There is a way for the Derived::property return being (internally) a Derived copy instead of only Base part copy, and with the Derived move constructor invoked?
May be a stupid question, but really I dont find solution. Why copy constructors on return dont copy the specialized class?
Thanks you!
 
    