std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
std::string to_string(direction d)
Conversion to string.
std::istream & operator>>(std::istream &is, direction &d)
Parsing.
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.