boost::histogram::axis::traits::index — Returns axis index for value.
// In header: <boost/histogram/axis/traits.hpp> template<class... Ts, typename U> auto index(const variant< Ts... > & axis, const U & value);
Throws std::invalid_argument if the value argument is not implicitly convertible.
Parameters:
axis
any axis instance
value
argument to be passed to index method
index