aantron / better-enums

C++ compile-time enum to string, iteration, in a single header file
http://aantron.github.io/better-enums
BSD 2-Clause "Simplified" License
1.67k stars 173 forks source link

Warning: use of old-style cast #48

Closed ftab closed 5 years ago

ftab commented 7 years ago

In Qt Creator, with the Clang code model selected (help -> about plugins -> C++), I see the following warning:

Semantic Issue -Wold-style-cast

23:5: warning: use of old-style cast enum.h:1089:21: note: expanded from macro 'BETTER_ENUM' enum.h:679:23: note: expanded from macro 'BETTER_ENUMS_TYPE' enum.h:500:13: note: expanded from macro 'BETTER_ENUMS_EAT_ASSIGN' :0:0: note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) enum.h:114:28: note: expanded from macro 'BETTER_ENUMS_ID' enum.h:114:28: note: expanded from macro 'BETTER_ENUMS_ID' enum.h:114:28: note: expanded from macro 'BETTER_ENUMS_ID'

(If I have the default code model selected, I get warnings whenever I use BETTER_ENUM(), and code completion/coloring doesn't work for those enums, so I kinda have to use the clang code model)

aantron commented 5 years ago

Presumably fixed in #74 (thanks @FelipeLema, @MartinDelille).