Boost logo

Boost Users :

Subject: Re: [Boost-users] [container] associative placement insertion
From: Cromwell Enage (sponage_at_[hidden])
Date: 2011-12-17 00:16:07


> I'm wondering how placement insertion works for pair-associative Boost.Container types. >  > For example, given: //[ex_code struct D { D(char,char) {} // Insert Boost.Move awareness here... }; boost::container::map<int,D> my_map; //] >  > Will my_map.emplace(0, 't', 'p') call D('t', 'p') and move the object into the map? >  > Will Boost.Unordered work the same way? I've answered these questions but ran into another. Boost.Unordered `emplace()` calls return `std::pair<iterator,bool>` rather than `iterator`.  Furthermore, MSVC 2010's TR1.Unordered `emplace()` implementation accepts only one argument: `std::pair<int,D>` in this case.  Is this expected? Cromwell D. Enage


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net