[Boost-bugs] [Boost C++ Libraries] #7722: smart_ptr includes <new> even if not needed

Subject: [Boost-bugs] [Boost C++ Libraries] #7722: smart_ptr includes <new> even if not needed
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-22 11:45:48


#7722: smart_ptr includes <new> even if not needed
-------------------------------------+--------------------------------------
 Reporter: romuloceccon@… | Owner: pdimov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 I'm using a subset of Boost in a project compiled with armcc and custom
 libraries. It's for an embedded system. As expected the compiler and/or
 libraries are broken, but I was able to workaround almost all problems
 with the macros `BOOST_NO_RTTI`, `BOOST_EXCEPTION_DISABLE` etc.

 However, the compiler still complains about the missing header `<new>`
 (not included in the library), because it's included by
 `smart_ptr/detail/shared_count.hpp` to have `std::bad_alloc` declared.

 But since `std::bad_alloc` is used only when BOOST_NO_EXCEPTIONS is
 defined (I'm ''not'' defining it) it's not always really needed. I
 attached a patch which alleviates the problem for those of us dealing with
 broken compilers and brings (I believe) no side effect for the rest of the
 community.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7722>
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:11 UTC