From 7529e9bb915ea8e662049f6df740b9fccad49d11 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Mon, 13 Aug 2018 16:17:22 +0200 Subject: [PATCH] fix for msvc 2nd try --- include/boost/histogram/histogram.hpp | 16 ++++++++-------- include/boost/histogram/histogram_fwd.hpp | 18 +++++++++++------- src/python/histogram.cpp | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/include/boost/histogram/histogram.hpp b/include/boost/histogram/histogram.hpp index 0c1c65dc..956de1e5 100644 --- a/include/boost/histogram/histogram.hpp +++ b/include/boost/histogram/histogram.hpp @@ -276,11 +276,11 @@ make_static_histogram_with(Storage&& s, Ts&&... axis) { /// dynamic type factory template -histogram...>, +histogram...>, dynamic_axes>> make_dynamic_histogram(Ts&&... axis) { using histogram_type = histogram...>, dynamic_axes>>; + mp11::mp_set_push_back...>, dynamic_axes>>; using value_type = typename histogram_type::axes_type::value_type; auto axes = typename histogram_type::axes_type({value_type(std::forward(axis))...}); return histogram_type(std::move(axes)); @@ -288,12 +288,12 @@ make_dynamic_histogram(Ts&&... axis) { /// dynamic type factory with custom storage type template -histogram...>, +histogram...>, dynamic_axes>, detail::rm_cv_ref> make_dynamic_histogram_with(Storage&& s, Ts&&... axis) { using histogram_type = histogram< - mp11::mp_rename...>, + mp11::mp_rename...>, dynamic_axes>, detail::rm_cv_ref>; using value_type = typename histogram_type::axes_type::value_type; @@ -304,11 +304,11 @@ make_dynamic_histogram_with(Storage&& s, Ts&&... axis) { /// dynamic type factory from axis iterators template > histogram, + detail::mp_set_union, dynamic_axes>> make_dynamic_histogram(Iterator begin, Iterator end) { using histogram_type = histogram, + detail::mp_set_union, dynamic_axes>>; auto axes = typename histogram_type::axes_type(begin, end); return histogram_type(std::move(axes)); @@ -317,13 +317,13 @@ make_dynamic_histogram(Iterator begin, Iterator end) { template > histogram, + detail::mp_set_union, dynamic_axes>, Storage> make_dynamic_histogram_with(Storage&& s, Iterator begin, Iterator end) { using histogram_type = histogram, + axis::any_std, typename Iterator::value_type::types>, dynamic_axes>, Storage>; auto axes = typename histogram_type::axes_type(begin, end); diff --git a/include/boost/histogram/histogram_fwd.hpp b/include/boost/histogram/histogram_fwd.hpp index 094578bd..d9f02a57 100644 --- a/include/boost/histogram/histogram_fwd.hpp +++ b/include/boost/histogram/histogram_fwd.hpp @@ -37,15 +37,19 @@ class integer; template > class category; -using types = mp11::mp_list< - regular, - regular, regular, - regular, circular<>, variable<>, - integer<>, category<>, category>; - template class any; -using any_std = mp11::mp_rename; +using any_std = any< + regular>, + regular>, + regular>, + regular>, + circular>, + variable>, + integer>, + category>, + category> +>; } // namespace axis diff --git a/src/python/histogram.cpp b/src/python/histogram.cpp index 814339a5..573588f7 100644 --- a/src/python/histogram.cpp +++ b/src/python/histogram.cpp @@ -156,7 +156,7 @@ bp::object histogram_init(bp::tuple args, bp::dict kwargs) { for (unsigned i = 0; i < dim; ++i) { bp::object pa = args[i + 1]; bool success = false; - boost::mp11::mp_for_each(axes_appender(pa, axes, success)); + boost::mp11::mp_for_each(axes_appender(pa, axes, success)); if (!success) { std::string msg = "require an axis object, got "; msg += bp::extract(bp::str(pa));