#include #include #include #define ECHO(S) std::cerr << S << std::endl struct Escape { Escape(const std::string& s) : str_(s) {} std::string str_; }; inline std::ostream& operator<< (std::ostream& o, const Escape& rhs) { return o << rhs.str_; } int main() { try { std::cerr << boost::lexical_cast(Escape("")) << std::endl; ECHO("pass"); } catch (std::exception& e) { ECHO("FAIL: " << e.what()); } }