[libannodex-dev] C++ clients and the use of 'class'
asstructmember names.
David Kuehling
dvdkhlng at gmx.de
Fri Mar 10 23:23:57 EST 2006
>>>>> "Ben" == Ben Martin <monkeyiq at users.sourceforge.net> writes:
> Although this would also work it also leaves you open to modifying
> those 5 characters if they appear anywhere in an Annodex, CMML or any
> header that those libraries include.
Well yes didn't think of that. But what about:
#ifdef __cplusplus
# define annodex_class _class
#else
# define annodex_class class
#endif
and replace the offending "class" members with "annodex_class". At
least the source code wouldn't be cluttered by lots of #ifdefs :). And
people wourd be free to write "annodex_class" in source-code which must
compile as C _and_ C++ code.
regards,
David
--
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
More information about the libannodex-dev
mailing list