From a5e71bef98898d9d73953defbc9df9b89822529a Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Mon, 28 Sep 2020 20:12:17 +0200
Subject: [PATCH] better template according to boost::histogram user guide

---
 Framework/Utilities/SaveBoostHistogram.hpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Framework/Utilities/SaveBoostHistogram.hpp b/Framework/Utilities/SaveBoostHistogram.hpp
index 7a11527d3..132fa9c6c 100644
--- a/Framework/Utilities/SaveBoostHistogram.hpp
+++ b/Framework/Utilities/SaveBoostHistogram.hpp
@@ -19,11 +19,12 @@ namespace corsika {
      * Note that this function makes a temporary, dense copy of the histogram, which could
      * be an issue for huge sizes (e.g. for high dimensions)
      */
-    template <typename hist_type>
-    void save_hist(hist_type const& h, std::string const& filename) {
-      auto const rank = h.rank();
-      auto const size = h.size();
-      using value_type = typename hist_type::value_type;
+    template <class Axes, class Storage>
+    void save_hist(boost::histogram::histogram<Axes, Storage> const& h,
+                   std::string const& filename) {
+      int const rank = h.rank();
+      int const size = h.size();
+      using value_type = typename boost::histogram::histogram<Axes, Storage>::value_type;
 
       std::vector<size_t> axes_dims;
       axes_dims.reserve(rank);
-- 
GitLab