[Boost-bugs] [Boost C++ Libraries] #10183: MSVC: Compile error with _CRTDBG_MAP_ALLOC

Subject: [Boost-bugs] [Boost C++ Libraries] #10183: MSVC: Compile error with _CRTDBG_MAP_ALLOC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-07 18:52:49


#10183: MSVC: Compile error with _CRTDBG_MAP_ALLOC
----------------------------------+-----------------------
 Reporter: raad@… | Owner: pdimov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
  Version: Boost Release Branch | Severity: Problem
 Keywords: |
----------------------------------+-----------------------
 If _CRTDBG_MAP_ALLOC is defined, there is the following define in the
 Visual C++ headers:
 {{{
 #define free(p) _free_dbg(p, _NORMAL_BLOCK)
 }}}

 That leads to compile errors because of a function named "free" in
 array_allocator.hpp:

 {{{
 boost/smart_ptr/detail/array_allocator.hpp(174): error C2059: syntax error
 : 'constant'
 boost/smart_ptr/detail/array_allocator.hpp(187) : see reference to class
 template instantiation 'boost::detail::as_allocator<A,T,R>' being compiled
 boost/smart_ptr/detail/array_allocator.hpp(182): error C2059: syntax error
 : 'constant'
 }}}

 1.55 worked fine. Could that function be renamed please?

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