aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Enum.h
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2006-09-29 00:16:28 +0000
committerReuben Thomas <rrt@sc3d.org>2006-09-29 00:16:28 +0000
commit5c392c24398b95df09e474b15691d4159eb38efd (patch)
tree44c2a630ac0105dcca7ecc9e2c8b3d41197adb98 /lib/Enum.h
parent65c2dbb6ae291536574e0066219921b70f593605 (diff)
downloadplptools-5c392c24398b95df09e474b15691d4159eb38efd.tar.gz
plptools-5c392c24398b95df09e474b15691d4159eb38efd.tar.bz2
plptools-5c392c24398b95df09e474b15691d4159eb38efd.zip
Fixes to compile on amd64 (plp_inttypes.h) and with gcc >= 4.1 (the
rest); patches from Debian bugs #384146, #386833 and #388831.
Diffstat (limited to 'lib/Enum.h')
-rw-r--r--lib/Enum.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Enum.h b/lib/Enum.h
index d4ffe19..5841b2a 100644
--- a/lib/Enum.h
+++ b/lib/Enum.h
@@ -304,14 +304,16 @@ template<typename E> typename Enum<E>::sdata Enum<E>::staticData;
* The definition of the static variable holding the static
* data for this Enumeration wrapper.
*/
-#define ENUM_DEFINITION(EnumName, initWith) \
-template Enum< EnumName >::sdata Enum< EnumName >::staticData; \
+#define ENUM_DEFINITION_BEGIN(EnumName, initWith) \
/** \
* actual definition of the constructor for the static data. \
* This is called implicitly by the definition above. \
*/ \
template <> Enum<EnumName>::sdata::sdata() : \
-name(#EnumName),defaultValue(initWith)
+ name(#EnumName),defaultValue(initWith) {
+
+#define ENUM_DEFINITION_END(EnumName) \
+} template Enum< EnumName >::sdata Enum< EnumName >::staticData;
/**
* Writes enumeration's string representation.