Boost C++ Libraries: Ticket #3962: filesystem operations.cpp calls std::malloc but does not include <cstdlib> https://svn.boost.org/trac10/ticket/3962 <p> In the filesystem library, file operations.cpp calls std::malloc without having included either &lt;cstdlib&gt; or &lt;stdlib.h&gt;. The code can work by accident if one of the standard library headers includes &lt;stdlib.h&gt; or &lt;cstdlib&gt;, but you can't depend on it. The code fails to compile using Apache stdcxx due to the missing header. </p> <p> The C++ rule is that if you use a declaration from a standard header, you must explicitly include that header. Reference: C++ 2003 standard, section 17.4.2.1 "Headers". </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3962 Trac 1.4.3 Beman Dawes Tue, 25 May 2010 23:47:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3962#comment:1 https://svn.boost.org/trac10/ticket/3962#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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62220" title="Fix #3962">[62220]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3962" title="#3962: Bugs: filesystem operations.cpp calls std::malloc but does not include &lt;cstdlib&gt; (closed: fixed)">#3962</a> </p> Ticket