[libannodex-dev] C++ clients and the use of 'class'
asstructmember names.
David Kuehling
dvdkhlng at gmx.de
Fri Mar 10 21:08:41 EST 2006
>>>>> "Ben" == Ben Martin <monkeyiq at users.sourceforge.net> writes:
> One option would be to ifdef guard the "class" member. This shouldn't
> break API because it would only come into effect if you are compiling
> with C++ which is not currently cleanly possible.
> As there are only a handful of "class" members this doesn't really
> pollute the header too much and you retain full compatibility with
> your C clients.
Well, why not do
#ifdef __cplusplus
#define class _class
#endif
At the start of the header file, and
#undef class
at the end?
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