Boost logo

Boost Users :

Subject: Re: [Boost-users] bimap<int, shared_ptr> question
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-01-20 20:15:18


On Thu, 21 Jan 2010 00:00:21 +0100, philip tucker <phhht_at_[hidden]>
wrote:

> I want a bimap<int,shared_ptr> in which the rhs is ordered not by
> pointer, but by thing pointed to.
> Can you give me a simple example to follow?

You need something like this:

bimap<int, bimaps::set_of<shared_ptr, custom_sort> >

where custom_sort is your version of std::less.

HTH,
Boris


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