| Home | Libraries | People | FAQ | More

## Function template update

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

## Synopsis

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

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

## Description

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

Parameters:

`axis` | any axis instance
`value` | argument to be passed to `update` or`index` method