I have the following statement defined in a C ++ class called StringProxy:
operator std::string&()
{
return m_string;
}
a) What is it and how does it work? I understand the idea of operator overloading, but they usually look like X operator+(double i).
b) Given an instance StringProxy, how can I use this statement to get m_string?
source
share