Subject: Re: [boost] [ptr_container] associative container insert takes reference instead of const reference as key ?
From: comic fans (comicfans44_at_[hidden])
Date: 2018-08-29 09:58:40
Thank you for the explanation, I missed the FAQ part
On Wed, Aug 29, 2018 at 4:25 PM Thorsten Ottosen via Boost
> Den 27-08-2018 kl. 15:03 skrev comic fans via Boost:
> > Hello , I've found that ptr_unordered_map.insert has following
> > signature (from code and latest doc)
> > std::pair<iterator,bool> insert( key_type& k, T* x );
> > that forbids calls like ptr_unordered_map.insert( myobj->id(), myobj)
> > ,I wonder if this is by design , or some other reason ? why other
> > overload takes const key_type& k as key type? and insert always call
> > insert_impl which have const reference as key type ? any help would
> > be appreciated.
> It is by design.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost