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