Boost logo

Boost :

Subject: Re: [boost] [Boost-interest] C++ library for runtime-concepts (type-erasure)
From: Ivan Le Lann (ivan.lelann_at_[hidden])
Date: 2011-02-16 04:42:42


----- "Andrzej Krzemienski" <akrzemi1_at_[hidden]> a écrit :

> > DEFINE_ERASURE( Calculator, (add)(sub),
> > virtual double add(double) = 0;
> > virtual double sub(double) = 0;
> > )
>
> > I would like feedback on how such an implementation would be
> received by
> the community.
>
> Hi, I think this macro would not work for the following interface:
>
> DEFINE_ERASURE( Dict, (getPair),
> virtual pair<string, string> getPair() = 0;
> )
>
> This is because the comma comma 'pair' will be interpreted as
> separatinh
> third from the fourth macro param.
>

It works as long as __VA_ARGS__ is only used to do plain text copy,
which is the case here:

        struct Concept { \
                __VA_ARGS__ \
        }; \

Regards,
Ivan


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