In my class I have a member:
std::vector<std::string> memory_;
Now I'd like to have a fnc returning what's in the memory's first element but I do not want to specify std::string
as a return type in case later I decide to use different type for this purpose so I've tried this but it doesn't work:
typename decltype(memory_)::value_type call_mem()
{
return memory_[0];
}
Any ideas how to specify return type in the most generic way?