]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/histogram/test/boost_range_support_test.cpp
1 // Copyright 2018-2019 Hans Dembinski
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #include <boost/core/lightweight_test.hpp>
8 #include <boost/histogram/axis/integer.hpp>
9 #include "throw_exception.hpp"
10 #include <boost/histogram/histogram.hpp>
11 #include <boost/histogram/make_histogram.hpp>
12 #include <boost/range/adaptor/filtered.hpp>
13 #include <boost/range/numeric.hpp>
15 using namespace boost::histogram
;
16 using namespace boost::adaptors
;
19 auto h
= make_histogram(axis::integer
<>(1, 4));
25 auto s1
= boost::accumulate(h
| filtered([](double x
) { return x
> 2; }), 0.0);
28 return boost::report_errors();