Opened 12 years ago
Closed 12 years ago
#5046 closed Bugs (fixed)
directing tuples to ostream does not work as expected
| Reported by: | anonymous | Owned by: | Steven Watanabe |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | tuple |
| Version: | Boost 1.45.0 | Severity: | Problem |
| Keywords: | tuple output formatting | Cc: | meesters@… |
Description
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
Change History (2)
comment:1 by , 12 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Replying to anonymous:
Doesn't std::setprecision work now?