Boost logo

Boost :

Subject: Re: [boost] Multi-methods and type switch
From: Larry Evans (cppljevans_at_[hidden])
Date: 2014-03-06 07:51:45


On 03/05/14 17:05, Camille GILLOT wrote:
> Hello,
>
> SoC2014 page on trac mentions interest for an implementation of type-switch
> for C++.

Could you please provide a link?

>
> For now, I have implemented a toy library for open multiple dispatch. It is
> based on compressed dispatch tables. It still just supports single inheritance
> and needs to attach integer tags to the dispatched class hierarchy.

Could you please provide source code? What are these integar tags
used for?

>
> Is there any interest for further development of this library ? What would be
> the typical use cases ?

I remember reading somewhere it could be used in a gaming application
to code what happens when, for example, to opposing space warships
do battle in space. Another toy use case it to decide what happens
when two animals meet. (e.g. Dog chase cat. Cat eats mouse,)

Using your library, how would you code the predator_prey.cpp example
shown here:

http://svn.boost.org/svn/boost/sandbox/variadic_templates/libs/composite_storage/sandbox/pack/predator_prey.cpp
?

>
> Note : Although I opened with a reference to SoC2014, I do not intend to write
> a GSoC proposal for this work.
>
> Best regards,
>
> Camille Gillot
>
>
> _______________________________________________
> 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