Boost C++ Libraries: Ticket #3610: boost::format copy constructor can create format object in unexpected state. https://svn.boost.org/trac10/ticket/3610 <p> If I copy construct a new boost::format object, I expect it to be in a (re)useable state. However, the following code throws a boost::io::too_many_args exception </p> <p> { </p> <blockquote> <p> boost::format f("%d"); </p> </blockquote> <blockquote> <p> std::cout &lt;&lt; f % 10 &lt;&lt; std::endl; std::cout &lt;&lt; f % 10 &lt;&lt; std::endl; <em> format object can be reused </em></p> </blockquote> <blockquote> <p> boost::format f2(f); std::cout &lt;&lt; f2 % 10 &lt;&lt; std::endl; <em> exception raised - new format is not in a valid state for formatting </em></p> </blockquote> <p> } </p> <p> On inspection of the code, the copy constructor always sets the dumped_ member to false, yet it copies the cur_arg_ from the rhs object. It's hard to see how this behaviour might be desirable. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3610 Trac 1.4.3 Samuel Krempp Sun, 15 Nov 2009 08:11:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3610#comment:1 https://svn.boost.org/trac10/ticket/3610#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Agreed, that was an oversight, the copy-constructed should copy .dumped_ fixed in revision 57672 </p> Ticket