void install_separator(std::ostream& o1, std::ostream& o2) { static custom_separator csep(o2); o1.rdbuf(&csep); o1.tie(&o2); }