Subject: [Boost-bugs] [Boost C++ Libraries] #3962: filesystem operations.cpp calls std::malloc but does not include <cstdlib>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-25 18:59:25
#3962: filesystem operations.cpp calls std::malloc but does not include <cstdlib>
-------------------------------------+--------------------------------------
Reporter: stephen.clamage@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: filesystem
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
In the filesystem library, file operations.cpp calls std::malloc without
having included either <cstdlib> or <stdlib.h>. The code can work by
accident if one of the standard library headers includes <stdlib.h> or
<cstdlib>, but you can't depend on it. The code fails to compile using
Apache stdcxx due to the missing header.
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".
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3962> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC