Say I have a constructor and a delegated constructor
SomeClass(const std::string&& _name) : obj_needs_construction(100), name(_name) {}
SomeClass(const std::string& _name) : SomeClass(_name) {}
But both are using the same type, I've seen many solutions but they all seem to operate because they make different types but that won't work in my situation. How can I solve this?
Thanks.
SomeClass(const std::string& _name) : SomeClass(std::move(_name)) {}