better-enums
better-enums copied to clipboard
Eclipst CDT complains about class Enum's default ctor
Eclipst CDT complains about the default constructor for class Enum - it gives a warning about the lack of explicit initialization of all data members.
Assuming no negative reprecussions, I suggest replacing this:
#ifndef BETTER_ENUMS_DEFAULT_CONSTRUCTOR
# define BETTER_ENUMS_DEFAULT_CONSTRUCTOR(Enum) \
private: \
Enum() { }
#endif
with this:
#ifndef BETTER_ENUMS_DEFAULT_CONSTRUCTOR
# define BETTER_ENUMS_DEFAULT_CONSTRUCTOR(Enum) \
private: \
Enum() : _value() { }
#endif
i.e. explicitly default-initializing the _value() field.