| Home | Libraries | People | FAQ | More

## Function template operator+

boost::histogram::operator+ — Pairwise add cells of two histograms and return histogram with the sum.

## Synopsis

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

    template<typename A1, typename S1, typename A2, typename S2>
      auto operator+(const histogram< A1, S1 > & a, const histogram< A2, S2 > & b);

## Description

The returned histogram type is the most efficient and safest one constructible from the inputs, if they are not the same type. If one histogram has a tuple axis, the result has a tuple axis. The chosen storage is the one with the larger dynamic range.