Boost logo

Boost :

Subject: Re: [boost] An open typeswitch using lambdas
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-11-29 17:33:15


On 29/11/2013 19:31, Sumant Tambe wrote:

> The implementation of the library is a little over 250 lines. Check it out
> here: http://coliru.stacked-crooked.com/a/72597a93b12916d4. clang is the
> only compiler I've been able to compile it with.

Doing the kind of thing you're doing should be easy to do with any C++
compiler.
You're apparently over-complicating things.

That stuff can simply be done with

template<class F1, class F2>
struct F : F1, F2
{
   using F1::operator();
   using F2::operator();
};

This approach also has the advantage that it doesn't require monomorphic
lambdas, it can build an overload of arbitrary function objects.


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