boostorg / histogram

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

deprecate sum::small and sum::large as workaround for bug in windows.h #343

Closed HDembinski closed 2 years ago

HDembinski commented 2 years ago

Closes #342

This is based on the discussion in #341, but without immediately breaking the API. Instead, the old API is deprecated in favor of an API that works around the issue.

We should not have to work around Microsoft violating the C++ standard, but here we are.

HDembinski commented 2 years ago

@emmenlau FYI

emmenlau commented 2 years ago

Oh my, I'm so sorry it had to come to this! But its highly appreciated and will possibly help many users in the long run. Thanks a lot @HDembinski for all your effort!

henryiii commented 2 years ago

Good workaround for an unfortunate issue. In boost-histogram, should we move to using the new names or keep the old names (since they are just strings in pybind11, and Python obviously supports large and small)? The old names are shorter and easier to remember/use in the REPL, etc, but the longer names match Boost.Histogram better. (and the sum accumulator doesn't have much use except for teaching about accumulators or for doing a manual highly-accurate accumulation, where most users won't need the two parts). We could even provide the official names, but have the short names as non-deprecated shortcuts if you want.