From 534743ee9886943e6ec388ba6403e3991c605c87 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Tue, 27 Apr 2021 14:04:53 +0200 Subject: [PATCH] better --- include/boost/histogram/accumulators/mean.hpp | 2 +- include/boost/histogram/unsafe_access.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/histogram/accumulators/mean.hpp b/include/boost/histogram/accumulators/mean.hpp index 1cfbe451..0bf321ef 100644 --- a/include/boost/histogram/accumulators/mean.hpp +++ b/include/boost/histogram/accumulators/mean.hpp @@ -154,7 +154,7 @@ class mean { private: impl_type data_{0, 0, 0}; - friend struct unsafe_access; + friend struct ::boost::histogram::unsafe_access; }; } // namespace accumulators diff --git a/include/boost/histogram/unsafe_access.hpp b/include/boost/histogram/unsafe_access.hpp index 303a8011..430b643f 100644 --- a/include/boost/histogram/unsafe_access.hpp +++ b/include/boost/histogram/unsafe_access.hpp @@ -117,7 +117,7 @@ struct unsafe_access { */ template static constexpr auto& accumulators_mean_impl(T& m) { - return reinterpret_cast(m); + return m.data_; } };