|
Boost : |
From: troy d. straszheim (troy_at_[hidden])
Date: 2004-09-23 00:56:53
On Sep 21, 2004, at 6:26 PM, John Torjo wrote:
> std::vector<int> v;
> // equivalent to your "[ ", ", ", " ]"
> std::cout << formatob(v, "[ %, % ]");
>
> // eq. to "<< ", " | ", " >>"
> std::cout << formatob(v, "<< % | % >>");
>
> // set only open/close decorators
> std::cout << formatob(v, "<< %*% >>");
>
> // sets only the separator
> std::cout << formatob(v, "*% | %*");
I like this as well. But it brings to the fore something I've been
wondering about the overall coherence of boost, (I haven't spoken up as
I'm relatively new to the list). What the discussion has evolved to,
above, looks a *lot* like what is in boost.format, and it would seem to
me that boost.format would be an appropriate place for it (both
specifically, as above, and theoretically as well). The docs mention
that the serialization part of outputformatters is better left to the
serialization library itself, so that's not an issue... offhand I
just don't see why this functionality should be separate.
I apologize if this has been discussed. I just got back from vacation
and the boost folder has 700 unread messages in it. :/
-t
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk