|
Boost Users : |
Subject: Re: [Boost-users] streaming of tuples - adjusting field widths?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-06 11:41:22
AMDG
On 1/6/2011 2:51 AM, Christian Meesters wrote:
> Having the following code (where 'out' is a std::ostream):
>
> out<< boost::tuples::set_open('[')
> << boost::tuples::set_close(']')
> << boost::tuples::set_delimiter(',')
> << std::setw(21)<< std::right<< get_some_tuple();
>
> I expected to see the tuple in a column of 21 spaces, adjusted to the
> right. Instead, the tuple is appended on 21 spaces. Any hint on what my
> mistake is?
You didn't make a mistake. This is a very common
error in implementing stream operators. Please
file a ticket at http://svn.boost.org/, and I'll fix it
as soon as I can.
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net