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

PrevUpHomeNext

Function template value_as

boost::histogram::axis::traits::value_as — Returns axis value for index if it is convertible to target type or throws.

Synopsis

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


template<typename Result, typename Axis> 
  Result value_as(const Axis & axis, real_index_type index);

Description

Like boost::histogram::axis::traits::value, but converts the result into the requested return type. If the conversion is not possible, throws std::runtime_error.

Parameters:

axis

any axis instance

index

floating point axis index

Template Parameters:

Axis

axis type

Result

requested return type


PrevUpHomeNext