diff --git a/bindings/python/mapnik_enumeration.hpp b/bindings/python/mapnik_enumeration.hpp index 230daa817..c01875c87 100644 --- a/bindings/python/mapnik_enumeration.hpp +++ b/bindings/python/mapnik_enumeration.hpp @@ -77,7 +77,7 @@ private: for (unsigned i = 0; i < EnumWrapper::MAX; ++i) { - // Register the strings allready defined for this enum. + // Register the strings already defined for this enum. base_type::value( EnumWrapper::get_string( i ), native_type( i ) ); } } diff --git a/include/mapnik/enumeration.hpp b/include/mapnik/enumeration.hpp index 3efdd10dc..8e92662b9 100644 --- a/include/mapnik/enumeration.hpp +++ b/include/mapnik/enumeration.hpp @@ -319,9 +319,16 @@ operator>>(std::istream & is, mapnik::enumeration & e) /** Helper macro. Runs the verify() method during static initialization. * @relates mapnik::enumeration */ +#if defined __clang__ +#define IMPLEMENT_ENUM( name, strings ) \ + const char ** name ::our_strings_ = strings; \ + std::string name ::our_name_ = #name; \ + bool name ::our_verified_flag_( name ::verify(__FILE__, __LINE__)); +#else #define IMPLEMENT_ENUM( name, strings ) \ template <> const char ** name ::our_strings_ = strings; \ template <> std::string name ::our_name_ = #name; \ template <> bool name ::our_verified_flag_( name ::verify(__FILE__, __LINE__)); +#endif #endif // MAPNIK_ENUMERATION_INCLUDED