Ticket #3665: bimap-allocator.2.patch

File bimap-allocator.2.patch, 1.6 KB (added by gutierrez.gustavo@…, 13 years ago)

fixed patch, now it works for the iterator based constructor.

  • boost/bimap/bimap.hpp

     
    190190         left_map::const_reference  left_const_reference;
    191191
    192192    typedef BOOST_DEDUCED_TYPENAME
    193         right_map::reference       right_reference;
     193    right_map::reference       right_reference;
    194194    typedef BOOST_DEDUCED_TYPENAME
    195195        right_map::const_reference right_const_reference;
    196196
    197197    typedef BOOST_DEDUCED_TYPENAME base_::relation::info_type info_type;
    198198
     199    typedef BOOST_DEDUCED_TYPENAME base_::core_type::allocator_type allocator_type;
     200   
    199201    /// Left map view
    200202    left_map  left;
    201203
    202204    /// Right map view
    203205    right_map right;
    204206
    205     bimap() :
     207  bimap(const allocator_type& al = allocator_type()) :
    206208
    207209        base_::relation_set(
    208210            ::boost::multi_index::get<
    209211                BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag
    210212            >(core)
    211213        ),
     214        core(al),
    212215        left (
    213216            ::boost::multi_index::get<
    214217                BOOST_DEDUCED_TYPENAME base_::logic_left_tag
     
    223226    {}
    224227
    225228    template< class InputIterator >
    226     bimap(InputIterator first,InputIterator last) :
     229    bimap(InputIterator first,InputIterator last,const allocator_type& al = allocator_type()) :
    227230
    228231        base_::relation_set(
    229232            ::boost::multi_index::get<
     
    231234            >(core)
    232235        ),
    233236
    234         core(first,last),
     237        core(first,last,BOOST_DEDUCED_TYPENAME base_::core_type::ctor_args_list(),al),
    235238
    236239        left (
    237240            ::boost::multi_index::get<