Boost logo

Boost Users :

Subject: [Boost-users] [Q] shared_ptr less than operator for std::set
From: V S P (toreason_at_[hidden])
Date: 2009-02-24 23:58:08


I am trying to use shared_ptr in
std::set and std::vector. For std::set I was expecting that
when I define a less than comparasing operation in my class
(wrapped by shared ptr) -- it would actually get invoked.

Instead I think it is the less than of the shared_ptr that is being
invoked
So I do not get the ordering I expect in my std::set container.

Therefore wanted to ask -- how can it be done, that the
operator.< of my class and not the shared_ptr's is being used by
std::set

I searched for posting on this subject but did not come up with the
solution.
Only discussions about the details of pointer comparasing

http://aspn.activestate.com/ASPN/Mail/Message/boost/1863117

VSP

-- 
  V S P
  toreason_at_[hidden]
-- 
http://www.fastmail.fm - Same, same, but different...

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