diff --git a/include/boost/histogram/algorithm/reduce.hpp b/include/boost/histogram/algorithm/reduce.hpp index c83181b9..17d80200 100644 --- a/include/boost/histogram/algorithm/reduce.hpp +++ b/include/boost/histogram/algorithm/reduce.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -23,32 +24,6 @@ namespace boost { namespace histogram { -namespace detail { -struct reduce_command { - static constexpr unsigned unset = static_cast(-1); - unsigned iaxis; - enum class range_t : char { - none, - indices, - values, - } range = range_t::none; - union { - axis::index_type index; - double value; - } begin; - union { - axis::index_type index; - double value; - } end; - unsigned merge = 0; // default value indicates unset option - bool crop = false; - // for internal use by the reduce algorithm - bool is_ordered = true; - bool use_underflow_bin = true; - bool use_overflow_bin = true; -}; -} // namespace detail - namespace algorithm { /** Holder for a reduce command. diff --git a/include/boost/histogram/detail/reduce_command.hpp b/include/boost/histogram/detail/reduce_command.hpp new file mode 100644 index 00000000..a3262fe4 --- /dev/null +++ b/include/boost/histogram/detail/reduce_command.hpp @@ -0,0 +1,40 @@ +// Copyright 2020 Hans Dembinski +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_HISTOGRAM_DETAIL_REDUCE_COMMAND_HPP +#define BOOST_HISTOGRAM_DETAIL_REDUCE_COMMAND_HPP + +#include + +namespace boost { +namespace histogram { +namespace detail { + +struct reduce_command { + static constexpr unsigned unset = static_cast(-1); + unsigned iaxis; + enum class range_t : char { + none, + indices, + values, + } range = range_t::none; + union { + axis::index_type index; + double value; + } begin, end; + unsigned merge = 0; // default value indicates unset option + bool crop = false; + // for internal use by the reduce algorithm + bool is_ordered = true; + bool use_underflow_bin = true; + bool use_overflow_bin = true; +}; + +} // namespace detail +} // namespace histogram +} // namespace boost + +#endif