ICC complains about 'explicit specialization of member must precede its
first use' if the templand and members are not pre-defined.
Strangely other strict compilers do not mention any problem.
/// convenience macro to instantiate Class-specific stuff in .cc files
#define InstanceIdDefinitions(Class, prefix) \
+ template<> const char *InstanceId<Class>::Prefix = prefix; \
+ template<> InstanceId<Class>::Value InstanceId<Class>::Last = 0; \
template<> std::ostream & \
InstanceId<Class>::print(std::ostream &os) const { \
return os << Prefix << value; \
- } \
- template<> const char *InstanceId<Class>::Prefix = prefix; \
- template<> InstanceId<Class>::Value InstanceId<Class>::Last = 0
+ }
/// print the id