|
Boost Users : |
Subject: Re: [Boost-users] Boost.stringalgo
From: Pavol Droba (droba_at_[hidden])
Date: 2009-10-28 14:43:49
Hello,
Marcia Chadly wrote:
> Compiling the folowing using is_iless as the predicate for a multi index
> container results in errors. When is_less is used instead, it compiles
> fine.
>
>
>
> typedef mi::multi_index_container<
>
> GTLayer,
>
> mi::indexed_by<
>
> mi::sequenced<>, // list-like index
>
> mi::ordered_unique<
>
> mi::tag<name>,
>
> mi::const_mem_fun<GTLayer, std::string,
> >Layer::GetLayerName>,
>
> //std::greater<std::string>
>
> ::boost::algorithm::is_iless // names sorted
>
It's a common misconception, that is_iless is for a string comparison.
Its isn't actually. It is designed to compare characters and it is used
as as pluging to string processing algorithms, that work on character-by-character
basis.
And it does not provide unary_function interface, since its operators is template based
for convenience.
Best Regards,
Pavol
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