Re: [Boost-bugs] [Boost C++ Libraries] #6611: boost::pool_allocator construct() with single argument required by GCC 4.6 stl

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6611: boost::pool_allocator construct() with single argument required by GCC 4.6 stl
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-02 13:19:41


#6611: boost::pool_allocator construct() with single argument required by GCC 4.6
stl
--------------------------------------+-------------------------------------
  Reporter: vivien.millet@… | Owner: cnewbold
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: pool
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords: pool_allocator construct
--------------------------------------+-------------------------------------
Changes (by Lars T. Kyllingstad <lars.kyllingstad@…>):

 * cc: lars.kyllingstad@… (added)
  * version: Boost 1.48.0 => Boost 1.51.0
  * type: Support Requests => Bugs

Comment:

 I have run into the same problem when using the std::list constructor
 which only takes the list size. Here is a test case:


 {{{
 #include <list>
 #include <boost/pool/pool_alloc.hpp>

 void foo()
 {
     typedef boost::fast_pool_allocator<int> Alloc;
     std::list<int, Alloc> myList(3);
 }
 }}}
 Compiled with GCC 4.6.1 using `-std=c++0x` and Boost 1.51.0, this results
 in the following errors:
 {{{
 /usr/include/c++/4.6/bits/stl_list.h: In member function ‘std::list<_Tp,
 _Alloc>::_Node* std::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with
 _Args = {}, _Tp = int, _Alloc = boost::fast_pool_allocator<int>,
 std::list<_Tp, _Alloc>::_Node = std::_List_node<int>]’:
 /usr/include/c++/4.6/bits/stl_list.h:1523:63: instantiated from ‘void
 std::list<_Tp, _Alloc>::_M_insert(std::list<_Tp, _Alloc>::iterator,
 _Args&& ...) [with _Args = {}, _Tp = int, _Alloc =
 boost::fast_pool_allocator<int>, std::list<_Tp, _Alloc>::iterator =
 std::_List_iterator<int>]’
 /usr/include/c++/4.6/bits/stl_list.h:998:11: instantiated from ‘void
 std::list<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}, _Tp =
 int, _Alloc = boost::fast_pool_allocator<int>]’
 /usr/include/c++/4.6/bits/stl_list.h:1474:4: instantiated from ‘void
 std::list<_Tp, _Alloc>::_M_default_initialize(std::list<_Tp,
 _Alloc>::size_type) [with _Tp = int, _Alloc =
 boost::fast_pool_allocator<int>, std::list<_Tp, _Alloc>::size_type =
 unsigned int]’
 /usr/include/c++/4.6/bits/stl_list.h:534:9: instantiated from
 â€˜std::list<_Tp, _Alloc>::list(std::list<_Tp, _Alloc>::size_type) [with _Tp
 = int, _Alloc = boost::fast_pool_allocator<int>, std::list<_Tp,
 _Alloc>::size_type = unsigned int]’
 a.cpp:7:35: instantiated from here
 /usr/include/c++/4.6/bits/stl_list.h:494:8: error: no matching function
 for call to ‘boost::fast_pool_allocator<std::_List_node<int>,
 boost::default_user_allocator_new_delete, boost::mutex, 32u,
 0u>::construct(std::list<int, boost::fast_pool_allocator<int> >::_Node*&)’
 /usr/include/c++/4.6/bits/stl_list.h:494:8: note: candidate is:
 /home/larky/.local/include/boost/pool/pool_alloc.hpp:398:10: note: void
 boost::fast_pool_allocator<T, UserAllocator, Mutex, NextSize,
 MaxSize>::construct(boost::fast_pool_allocator<T, UserAllocator, Mutex,
 NextSize, MaxSize>::pointer, const value_type&) [with T =
 std::_List_node<int>, UserAllocator =
 boost::default_user_allocator_new_delete, Mutex = boost::mutex, unsigned
 int NextSize = 32u, unsigned int MaxSize = 0u,
 boost::fast_pool_allocator<T, UserAllocator, Mutex, NextSize,
 MaxSize>::pointer = std::_List_node<int>*, boost::fast_pool_allocator<T,
 UserAllocator, Mutex, NextSize, MaxSize>::value_type =
 std::_List_node<int>]
 /home/larky/.local/include/boost/pool/pool_alloc.hpp:398:10: note:
 candidate expects 2 arguments, 1 provided
 }}}
 I have changed the ticket type to "Bugs", since this version of Boost
 claims to support C++11 mode in GCC 4.6.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6611#comment:2>
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