Boost C++ Libraries

...one 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.
PrevUpHomeNext

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, 
         typename _V = std::decay_t<detail::arg_type<decltype(&Axis::index)>> > 
  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::static_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


PrevUpHomeNext