Opened 5 years ago

#13282 new Bugs

Allocator compilation problems with gcc 4.8.1

Reported by: apmanol@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.64.0 Severity: Problem
Keywords: allocator Cc:

Description

Hello all,

thanks for providing this great software. Just a remark, when I tried to use the allocators with gcc 4.8.x it fails during the instantiation.

#include <set>
#include <boost/container/allocator.hpp>
#include <boost/container/adaptive_pool.hpp>

int foo()
{
    using myset= std::set<int, std::less<int>, boost::container::allocator<int>>;

    myset test_set;
    
    return 1;
}

fails with

In file included from /opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/set:60:0,
                 from <source>:1:
/opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/bits/stl_tree.h: In instantiation of 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_destroy_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type) [with _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = boost::container::allocator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<int>*]':
/opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/bits/stl_tree.h:1127:23:   required from 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type) [with _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = boost::container::allocator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<int>*]'
/opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/bits/stl_tree.h:671:28:   required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = boost::container::allocator<int>]'
/opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/bits/stl_set.h:90:11:   required from here
/opt/compiler-explorer/gcc-4.8.5/include/c++/4.8.5/bits/stl_tree.h:421:2: error: 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, boost::container::allocator<int> >::_Node_allocator' has no member named 'destroy'
  _M_get_Node_allocator().destroy(__p);
  ^
Compiler exited with result code 1

Change History (0)

Note: See TracTickets for help on using tickets.