Boost C++ Libraries: Ticket #627: program_options: format_paragraph assert fails on long line https://svn.boost.org/trac10/ticket/627 <pre class="wiki">Boost 1.33.1, MSVC 8.0 When format_paragraph() in options_description.cpp attempts to format a line that will wrap because it is &gt; 80 chars, it causes an assert failure in the standard library string iterator's operator+=(). The offending po:: code line is options_description.cpp Line 361: if (line_begin + (line_length - indent) &gt; par_end) ... Relevant call stack attached. My guess is that the assert is complaining that the + operation has produced an iterator past the string's end(); this code seems to be assuming that the iterator object is a pointer. I believe it is officially undefined to advance an iterator past end(). One way of getting around this might be to use std::distance instead of comparing the iterators directly. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/627 Trac 1.4.3 Vladimir Prus Wed, 10 May 2006 06:24:45 GMT <link>https://svn.boost.org/trac10/ticket/627#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/627#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=321498 Thank you for the bug report. However, I believe this bug is already fixed in the CVS, and the bugfix will be included in the 1.34 release. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>kbluck</dc:creator> <pubDate>Wed, 10 May 2006 16:00:38 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/627#comment:2 https://svn.boost.org/trac10/ticket/627#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=11142 Thanks for the quick response; I should have checked CVS in the first place. I just now rebuilt with options_description.cpp HEAD, file rev. 1.16. The same assertion is still there, although the triggering po:: code has now moved to line 375: line_end = line_begin + line_length; I'm pretty sure it's the same issue: the string's iterator is being incremented past end(). I've updated the call stack attachment to reflect the current line numbes. </pre> Ticket az_sw_dude Mon, 29 May 2006 23:38:07 GMT <link>https://svn.boost.org/trac10/ticket/627#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/627#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=579686 Assign to Vladimir </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Tue, 20 Feb 2007 12:31:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/627#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/627#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=321498 Originator: NO Would you please try again. Revision 1.17 of options_description.cpp (and 1.16.2.1 on RC_1_34_0 branch) have some possible fixes. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Thu, 28 Jun 2007 06:56:46 GMT</pubDate> <title>status, resolution changed; severity set https://svn.boost.org/trac10/ticket/627#comment:5 https://svn.boost.org/trac10/ticket/627#comment:5 <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-old">Accepted</span> → <span class="trac-field-new">fixed</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Showstopper</span> </li> </ul> <p> No further feedback from submitter, so I assume this is fixed in revision 1.17. </p> Ticket