...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::histogram::multi_index — Holder for multiple axis indices.
// In header: <boost/histogram/multi_index.hpp> template<std::size_t Size> struct multi_index { // types typedef axis::index_type value_type; typedef value_type * iterator; typedef const value_type * const_iterator; // construct/copy/destruct template<class... Is> multi_index(axis::index_type, Is...); template<class... Is> multi_index(const std::tuple< axis::index_type, Is... > &); template<typename Iterable> multi_index(const Iterable &); multi_index(priv_tag); template<typename T, std::size_t... Is> multi_index(const T &, mp11::index_sequence< Is... >); // public static functions static multi_index create(std::size_t); static constexpr std::size_t size() noexcept; // public member functions iterator begin() noexcept; iterator end() noexcept; const_iterator begin() const noexcept; const_iterator end() const noexcept; };
Adapts external iterable, tuple, or explicit list of indices to the same representation.
multi_index
public
construct/copy/destructtemplate<class... Is> multi_index(axis::index_type i, Is... is);
template<class... Is> multi_index(const std::tuple< axis::index_type, Is... > & is);
template<typename Iterable> multi_index(const Iterable & is);
multi_index(priv_tag);
template<typename T, std::size_t... Is> multi_index(const T & is, mp11::index_sequence< Is... >);
multi_index
public static functionsstatic multi_index create(std::size_t s);
static constexpr std::size_t size() noexcept;