Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Function template update

boost::histogram::axis::traits::update — Returns pair of axis index and shift for the value argument.


// In header: <boost/histogram/axis/traits.hpp>

template<typename Axis, typename U> 
  std::pair< index_type, index_type > update(Axis & axis, const U & value);


Throws std::invalid_argument if the value argument is not implicitly convertible to the argument expected by theindex method. If the result of boost::histogram::axis::traits::get_options<decltype(axis)> has the growth flag set, callupdate method with the argument and return the result. Otherwise, callindex and return the pair of the result and a zero shift.



any axis instance


argument to be passed to update orindex method