bimap<int, shared_ptr> question
20 Jan
2010
20 Jan
'10
11 p.m.
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? I know this is a naive question, but I have searched the docs long and hard for such an example. If one appears, I'd be interested in knowing where. Thanks in advance.
21 Jan
21 Jan
1:15 a.m.
On Thu, 21 Jan 2010 00:00:21 +0100, philip tucker <phhht@earthlink.net> 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
5356
Age (days ago)
5357
Last active (days ago)
1 comments
2 participants
participants (2)
-
Boris Schaeling
-
philip tucker