Closed saulthu closed 5 years ago
Thanks for reporting this!
I've been able to reproduce it by adding code based on your enum
example above - and have then tried two ways of fixing it.
The first patch above adds the #undef
, as suggested.
The second patch above uses a different approach - a helper function that returns the "empty" container. This is cleaner as there's no chance that we stomp on an earlier #define of EMPTY... I'm not super happy with the names though - as empty() returns a container with one value in!
@isidore and I are pairing on this library later this week, so we'll chat about this then and finalise a fix - as well as hopefully doing a new release, to make the fix available...
Note to self: I'd like to try and remove #define STATIC
in Macros.h as well - or rename it to make a clash much less likely.
Thanks for the quick action! I saw your cpponsea talk on youtube and liked what I saw so gave it a try. Have my first approval test running now :)
I can't tell you how happy that makes me!!!
(that you have an approval test running, I mean...)
My test cpp file starts with:
which has the following error:
and at
persistence.hpp(506)
there is an enum element called EMPTY:and the error is caused by
CombinationApprovals.h
which contains:So, can we
#undef EMPTY
withinCombinationApprovals.h
?