diff --git a/include/boost/histogram/detail/accumulator_traits.hpp b/include/boost/histogram/detail/accumulator_traits.hpp index 76269ea8..b5d2107d 100644 --- a/include/boost/histogram/detail/accumulator_traits.hpp +++ b/include/boost/histogram/detail/accumulator_traits.hpp @@ -32,28 +32,25 @@ struct accumulator_traits_holder { // member function pointer with weight_type as first argument is better match template accumulator_traits_holder>...> -accumulator_traits_impl_call_op( - R (T::*)(boost::histogram::weight_type, Ts...)); + accumulator_traits_impl_call_op(R (T::*)(boost::histogram::weight_type, Ts...)); template accumulator_traits_holder>...> -accumulator_traits_impl_call_op( - R (T::*)(boost::histogram::weight_type&, Ts...)); + accumulator_traits_impl_call_op(R (T::*)(boost::histogram::weight_type&, Ts...)); template accumulator_traits_holder>...> -accumulator_traits_impl_call_op( - R (T::*)(boost::histogram::weight_type&&, Ts...)); + accumulator_traits_impl_call_op(R (T::*)(boost::histogram::weight_type&&, Ts...)); template accumulator_traits_holder>...> -accumulator_traits_impl_call_op( - R (T::*)(const boost::histogram::weight_type&, Ts...)); + accumulator_traits_impl_call_op(R (T::*)(const boost::histogram::weight_type&, + Ts...)); // member function pointer only considered if all specializations above fail template accumulator_traits_holder>...> -accumulator_traits_impl_call_op(R (T::*)(Ts...)); + accumulator_traits_impl_call_op(R (T::*)(Ts...)); template auto accumulator_traits_impl(T&, priority<2>) diff --git a/include/boost/histogram/detail/fill_n.hpp b/include/boost/histogram/detail/fill_n.hpp index 031b3d46..a282a403 100644 --- a/include/boost/histogram/detail/fill_n.hpp +++ b/include/boost/histogram/detail/fill_n.hpp @@ -76,18 +76,20 @@ struct index_visitor { template void operator()(const T& iterable_or_value) const { - dispatch_on_value_or_iterable(mp11::mp_bool<(std::is_convertible::value || - !is_iterable::value)>{}, - iterable_or_value); + dispatch_on_value_or_iterable( + mp11::mp_bool<(std::is_convertible::value || + !is_iterable::value)>{}, + iterable_or_value); } template void dispatch_on_value_or_iterable(std::false_type, const T& iterable) const { // T is iterable; fill N values const auto* tp = dtl::data(iterable) + start_; - for (auto it = begin_; it != begin_ + size_; ++it) linearize_element(IsGrowing{}, it, *tp++); - } - + for (auto it = begin_; it != begin_ + size_; ++it) + linearize_element(IsGrowing{}, it, *tp++); + } + template void linearize_element(std::true_type, pointer it, const T& x) const { // must use this code for all axes if one of them is growing @@ -154,7 +156,6 @@ struct index_visitor { // no axis is growing linearize(idx, stride_, axis_, try_cast(value)); } - }; template diff --git a/test/algorithm_project_test.cpp b/test/algorithm_project_test.cpp index 88b997f7..4c4b348a 100644 --- a/test/algorithm_project_test.cpp +++ b/test/algorithm_project_test.cpp @@ -8,8 +8,8 @@ #include #include #include -#include #include +#include #include #include #include