|
Boost Users : |
Subject: Re: [Boost-users] boost::tuple in std::map
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2015-06-05 08:42:11
On Fri, Jun 5, 2015 at 8:21 AM, Uthpal Urubail
<uthpal.urubail_at_[hidden]> wrote:
> Experts,
>
> I am using boost::tuple as key in std::map. I would like to write my own
> comparison method (considering tolerance in comparison)
What's the question?
> The default comparison defined in tuple_comparison.hpp is of no use to me.
Seems like this is less of a boost question and more of a general C++ question.
std::map, or any range, comparisons, generally take a const & of
whatever the type is, key, item, whatever, and may return bool, int
(or other integral type), etc.
How you actually implement it is up to you. Could be a function,
functor, lambda expression, whatever, AFAIK.
> Any help in this is highly appreciated.
HTH
> Regards,
>
> UJ
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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