boostorg / histogram

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

fix: Boolean axis missing options() method #283

Closed henryiii closed 4 years ago

henryiii commented 4 years ago

The new boolean axis is missing an options() method, which causes it to break in code that expects all axes to have an options method (boost-histogram, for example). This adds this method (hopefully in time for 1.74).

HDembinski commented 4 years ago

Thank you, I will merge this, but your code should not rely on options(), it is an optional axis feature, see https://www.boost.org/doc/libs/develop/libs/histogram/doc/html/histogram/concepts.html

Please use axis::traits::options() for uniform access.

henryiii commented 4 years ago

Thank you, I think this is still more consistent; Boost.Histogram should provide the optional features if possible - It's great that it's not required, as well, though.

Actually, for my usage, axis::traits::get_options seems to be perfect, adapted the boost-histogram code to consistently use that. :)