boostorg / histogram

Fast multi-dimensional generalized histogram with convenient interface for C++14
Boost Software License 1.0
313 stars 74 forks source link

windows.h illegally uses `#define small char`, explore possible work-arounds #342

Closed HDembinski closed 2 years ago

HDembinski commented 2 years ago

According to my research, it is not possible to work around this error in the windows.h header in this library without breaking the API.

https://stackoverflow.com/questions/21165891/is-small-a-keyword-in-c

We could deprecate the old API for everyone and add new methods large_part and small_part as suggested in #341. When the preprocessor detects that small is set, it would not compile the deprecated API. This should fix the issue for those that are affected but not break the code of other people.