title: Is there a standard way to convert a class to a string
body: <p>In Java, the standard is to define the method <code>toString()</code> to return a string representation of a class.  Other than overloading <code>operator&lt;&lt;</code>, is there any such standard in C++?  I know there are the <code>std::to_string()</code> methods to get a string representation of a number.  Does the C++ standard speak of defining the method <code>to_string()</code> to serve similar purpose for a class, or is there a common practice followed by C++ programmers?</p>