boostorg / histogram

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

Add static asserts on axes type #168

Closed HDembinski closed 5 years ago

HDembinski commented 5 years ago

It is documented here which axes types are supported, but we should additionally have a static assert on that. https://github.com/boostorg/histogram/blob/develop/include/boost/histogram/histogram.hpp#L40

HDembinski commented 5 years ago

Not implemented. Users are not supposed to set the template arguments by hand, this is done correctly automatically by the make_histogram factory functions. The valid types are also documented. Since there is a cost in doing more run-time checks and no obvious gain, I reject this.