Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-04-08 04:17:34


Boost.Function does what I need. Thanks a lot for the tip.

Arkadiy

> > I am wonderring if there is an easy way to determine the type of a
lambda
> > functor, kind of lambda-specific typeof facility. I do realize that the
> > primary purpose of lambda is to create temporary functors to pass to STL
> > algorithms.
>
> > On the other hand, there are contexts where functors need to be
> > stored, such as in std::set, etc.
>
> I assume you mean for the comparator, not storing a set of functors.
>
> > Has anything been done by anybody in this regard?
>
> I've often used Boost.Function for this, though I'm interested in
> approaches that don't involve the function-pointer-like overhead:
>
> typedef Some_Type SetElementType;
> typedef boost::function< bool (const SetElementType&
> , const SetElementType&) >
> SetElementComparator;
> typedef std::set< SetElementType, SetElementComparator > SetType;
>
> Best,
>
> --
> Shannon Stewman | Let us walk through the waning night,
> Caught in a whirlpool, | As dawn-rays tickle our toes, the dew soothes
> A quartering act: | Our blistered soles, and damp bones stir
> Solitude or society? | As crimson cracks under the blue-grey sky.
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk