[Boost-bugs] [Boost C++ Libraries] #10716: Pool allocators fail to compile under g++4.7, 4.8 and 4.9

Subject: [Boost-bugs] [Boost C++ Libraries] #10716: Pool allocators fail to compile under g++4.7, 4.8 and 4.9
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-10-30 06:28:07


#10716: Pool allocators fail to compile under g++4.7, 4.8 and 4.9
-------------------------------------------------+-------------------------
 Reporter: Conrad Mercer <conrad.mercer@…> | Owner: cnewbold
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: pool
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: allocate_shared allocator |
  compile_error |
-------------------------------------------------+-------------------------
 Hi,

 Usage of either boost::pool_allocator or boost::fast_pool_allocator with
 std::allocate_shared can cause compile errors on the g++4.7, 4.8, 4.9.
 There is much more detailed information on the stack overflow question I
 made: [http://stackoverflow.com/questions/26396293/boost-pool-allocators-
 wont-compile-with-stdallocate-shared-in-g]

 Code exhibiting the error:

 {{{
 #include "boost/pool/pool.hpp"
 #include "boost/pool/pool_alloc.hpp"

 #include <memory>

 int main(int argc, char** argv)
 {
   auto fails = std::allocate_shared<int>(
 boost::fast_pool_allocator<int>() );

   auto works =
 std::allocate_shared<int>(boost::fast_pool_allocator<int>(), 5);
 }
 }}}

 Simply put boost allocators are still specified using the c++98 style and
 this causes g++ to fail for the versions of g++ mentioned above. However
 it should be noted that g++ 5.0 does compile correctly and this implies
 that updating is not necessarily mandatory. I have made this ticket so
 that the appropriate people can make a determination about whether to fix
 this or not. Also note that changing to the c++11 allocator style seems to
 be straightforward.

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