diff -r 795d1c3554b9 -r 15e46ea3151f src/basics.h --- a/src/basics.h Fri Feb 10 23:06:24 2017 +0200 +++ b/src/basics.h Sun Feb 12 16:02:02 2017 +0200 @@ -197,7 +197,7 @@ Iterator end() { - return Iterator(EnumLimits::End); + return Iterator(EnumLimits::Last + 1); } }; @@ -209,9 +209,10 @@ // Is a value inside an enum? template -bool valueInEnum(typename std::underlying_type::type x) +bool valueInEnum(Enum enumerator) { - return x >= EnumLimits::First and x <= EnumLimits::Last; + typename std::underlying_type::type index = static_cast::type>(enumerator); + return index >= EnumLimits::First and index <= EnumLimits::Last; } double getRadialPoint(int segment, int divisions, double(*func)(double));