Boost C++ Libraries: Ticket #12776: Add c_str free function to Boost::Format https://svn.boost.org/trac10/ticket/12776 <p> A <code>c_str</code> function that returns a pointer to a new copy of the formatted string would be useful to use Boost::Format to create C-style strings. </p> <p> Simply calling <code>str(fmt).c_str()</code> is insufficient since this returns a pointer to a temporary. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12776 Trac 1.4.3 olafvdspek@… Mon, 19 Jun 2017 11:00:55 GMT <link>https://svn.boost.org/trac10/ticket/12776#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12776#comment:1</guid> <description> <p> Where would this new copy be stored? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Wed, 11 Oct 2017 03:52:33 GMT</pubDate> <title>owner, severity changed https://svn.boost.org/trac10/ticket/12776#comment:2 https://svn.boost.org/trac10/ticket/12776#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Samuel Krempp</span> to <span class="trac-author">James E. King, III</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Optimization</span> </li> </ul> <p> As a pattern in the standard template library that already exists, c_str() returns a pointer that is only valid for the lifetime of the object from which it was derived, and may be invalidated by mutations of that object. I see little value in encouraging the use of naked pointers here or in overriding the meaning of c_str. </p> Ticket James E. King, III Fri, 13 Oct 2017 19:51:44 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12776#comment:3 https://svn.boost.org/trac10/ticket/12776#comment:3 <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">wontfix</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.66.0</span> </li> </ul> Ticket