| Home | Libraries | People | FAQ | More

## Function template width_as

boost::histogram::axis::traits::width_as — Returns bin width at axis index.

## Synopsis

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

    template<typename Result, typename Axis>
      Result width_as(const Axis & axis, index_type index);

## Description

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

Parameters: |
`axis` | any axis instance
`index` | bin index