
16 Feb
2011
16 Feb
'11
9:42 a.m.
----- "Andrzej Krzemienski" <akrzemi1@gmail.com> 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