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

Parameters:

axis

any axis instance

value

argument to be passed to update orindex method


PrevUpHomeNext