Subject: [Boost-bugs] [Boost C++ Libraries] #5046: directing tuples to ostream does not work as expected
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-07 08:42:08
#5046: directing tuples to ostream does not work as expected
-------------------------------------+--------------------------------------
Reporter: anonymous | Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: tuple
Version: Boost 1.45.0 | Severity: Problem
Keywords: tuple output formatting |
-------------------------------------+--------------------------------------
Assuming 'out' is a std::ostream the following code produces wrong
output:
{{{
out << boost::tuples::set_open('[')
<< boost::tuples::set_close(']')
<< boost::tuples::set_delimiter(',')
<< std::setw(21) << std::right << some_boost_tuple;
}}}
Instead of being within a field of 21 spaces, the tuple is appended to
those spaces.
When fixing the bug - is it possible to also account for double precision
settings by '<< std::std::setprecision(integer)'? That would be really
helpful if dealing with tuples containing doubles.
TIA
Christian Meesters
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5046> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC