Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / histogram / test / storage_adaptor_test.cpp
index 4b99cab..6f8e01f 100644 (file)
@@ -8,9 +8,9 @@
 #include <boost/core/lightweight_test.hpp>
 #include <boost/histogram/accumulators/weighted_mean.hpp>
 #include <boost/histogram/accumulators/weighted_sum.hpp>
-#include "throw_exception.hpp"
 #include <boost/histogram/storage_adaptor.hpp>
 #include <boost/histogram/unlimited_storage.hpp>
+#include <boost/histogram/weight.hpp>
 #include <cmath>
 #include <deque>
 #include <limits>
@@ -18,6 +18,7 @@
 #include <sstream>
 #include <vector>
 #include "is_close.hpp"
+#include "throw_exception.hpp"
 #include "utility_allocator.hpp"
 
 using namespace boost::histogram;
@@ -230,7 +231,7 @@ int main() {
     auto a = storage_adaptor<std::vector<accumulators::weighted_mean<double>>>();
     a.reset(1);
     a[0](/* sample */ 1);
-    a[0](/* weight */ 2, /* sample */ 2);
+    a[0](weight(2), /* sample */ 2);
     a[0] += accumulators::weighted_mean<>(1, 0, 0, 0);
     BOOST_TEST_EQ(a[0].sum_of_weights(), 4);
     BOOST_TEST_IS_CLOSE(a[0].value(), 1.25, 1e-3);