
17 May
2005
17 May
'05
5:39 p.m.
looking into the code, the documentation, and the proposed standard I can't find a way to output a boost::tuple to a stream with no opening and closing characters???
Can't be done with the current interface. I started to work on a tuple_punct facet but in the end I just copied the code for operator<< and detail::print into my own functions and removed the separators. (Doesn't work together with the tuple_io header of course) I needed it for my own to_string function. template <typename TupleT> std::string to_string(const TupleT& arg) { std::ostringstream ss; ss << arg; return ss.str(); } Now I can do things like to_string(10); to_string(make_tuple(setw(10), &hex, 20));