Boost logo

Boost Users :

Subject: [Boost-users] streaming of tuples - adjusting field widths?
From: Christian Meesters (meesters_at_[hidden])
Date: 2011-01-06 05:51:17


Hi,

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?

TIA
Christian


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