Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / histogram / accumulators / weighted_sum.hpp
index 81b3791..78c210a 100644 (file)
@@ -7,7 +7,8 @@
 #ifndef BOOST_HISTOGRAM_ACCUMULATORS_WEIGHTED_SUM_HPP
 #define BOOST_HISTOGRAM_ACCUMULATORS_WEIGHTED_SUM_HPP
 
-#include <boost/histogram/fwd.hpp>
+#include <boost/core/nvp.hpp>
+#include <boost/histogram/fwd.hpp> // for weighted_sum<>
 #include <type_traits>
 
 namespace boost {
@@ -78,7 +79,10 @@ public:
   }
 
   template <class Archive>
-  void serialize(Archive&, unsigned /* version */);
+  void serialize(Archive& ar, unsigned /* version */) {
+    ar& make_nvp("sum_of_weights", sum_of_weights_);
+    ar& make_nvp("sum_of_weights_squared", sum_of_weights_squared_);
+  }
 
 private:
   RealType sum_of_weights_ = RealType();