c++11 is it possible to create an interface with a function that allows various return types T or const T&?
I want to create an interface for classes that return a message.
My problem is that sometimes it will be better to return a string and sometimes a const string&.
What would be the best way to give inheriting classes the possibility of choosing the return type?