Boost C++ Libraries: Ticket #5046: directing tuples to ostream does not work as expected https://svn.boost.org/trac10/ticket/5046 <p> Assuming 'out' is a std::ostream the following code produces wrong output: </p> <pre class="wiki">out &lt;&lt; boost::tuples::set_open('[') &lt;&lt; boost::tuples::set_close(']') &lt;&lt; boost::tuples::set_delimiter(',') &lt;&lt; std::setw(21) &lt;&lt; std::right &lt;&lt; some_boost_tuple; </pre><p> Instead of being within a field of 21 spaces, the tuple is appended to those spaces. </p> <p> When fixing the bug - is it possible to also account for double precision settings by '&lt;&lt; std::std::setprecision(integer)'? That would be really helpful if dealing with tuples containing doubles. </p> <p> TIA Christian Meesters </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5046 Trac 1.4.3 Steven Watanabe Fri, 07 Jan 2011 14:25:47 GMT owner, status changed https://svn.boost.org/trac10/ticket/5046#comment:1 https://svn.boost.org/trac10/ticket/5046#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Joel de Guzman</span> to <span class="trac-author">Steven Watanabe</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5046" title="#5046: Bugs: directing tuples to ostream does not work as expected (closed: fixed)">anonymous</a>: </p> <blockquote class="citation"> <p> When fixing the bug - is it possible to also account for double precision settings by '&lt;&lt; std::std::setprecision(integer)'? That would be really helpful if dealing with tuples containing doubles. </p> </blockquote> <p> Doesn't std::setprecision work now? </p> Ticket Steven Watanabe Fri, 07 Jan 2011 15:22:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5046#comment:2 https://svn.boost.org/trac10/ticket/5046#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/67751" title="Handle width correctly. Fixes #5046.">[67751]</a>) Handle width correctly. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5046" title="#5046: Bugs: directing tuples to ostream does not work as expected (closed: fixed)">#5046</a>. </p> Ticket