From e0304abc710e5afc6d2453d1cc96a96c4b556eb6 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Mon, 30 Oct 2017 10:16:09 +0100 Subject: [PATCH] gcc-4.8 fix --- .../histogram/histogram_impl_dynamic.hpp | 30 +++++++++++-------- .../boost/histogram/histogram_impl_static.hpp | 28 ++++++++--------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/boost/histogram/histogram_impl_dynamic.hpp b/include/boost/histogram/histogram_impl_dynamic.hpp index f0c4c929a..3fbe9d854 100644 --- a/include/boost/histogram/histogram_impl_dynamic.hpp +++ b/include/boost/histogram/histogram_impl_dynamic.hpp @@ -327,17 +327,19 @@ class histogram { template inline void xlin_w(std::size_t &, std::size_t &, double &) const {} - template - inline void xlin_w(std::size_t &idx, std::size_t &stride, double &x, - weight &&w, Rest &&... rest) const { - x = w.value; + template + inline typename enable_if>::type + xlin_w(std::size_t &idx, std::size_t &stride, double &x, First &&first, + Rest &&... rest) const { + x = first.value; return xlin_w(idx, stride, x, std::forward(rest)...); } template - inline void xlin_w(std::size_t &idx, std::size_t &stride, double &x, - First &&f, Rest &&... rest) const { - apply_visitor(xlin_visitor{idx, stride, std::forward(f)}, + inline typename disable_if>::type + xlin_w(std::size_t &idx, std::size_t &stride, double &x, First &&first, + Rest &&... rest) const { + apply_visitor(xlin_visitor{idx, stride, std::forward(first)}, axes_[D]); return xlin_w(idx, stride, x, std::forward(rest)...); } @@ -345,16 +347,18 @@ class histogram { template inline void xlin_n(std::size_t &, std::size_t &, unsigned &) const {} - template - inline void xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, - count &&c, Rest &&... rest) const { - x = c.value; + template + inline typename enable_if>::type + xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, First &&first, + Rest &&... rest) const { + x = first.value; return xlin_n(idx, stride, x, std::forward(rest)...); } template - inline void xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, - First &&f, Rest &&... rest) const { + inline typename disable_if>::type + xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, First &&f, + Rest &&... rest) const { apply_visitor(xlin_visitor{idx, stride, std::forward(f)}, axes_[D]); return xlin_n(idx, stride, x, std::forward(rest)...); diff --git a/include/boost/histogram/histogram_impl_static.hpp b/include/boost/histogram/histogram_impl_static.hpp index 6eb5dc149..4b8186a51 100644 --- a/include/boost/histogram/histogram_impl_static.hpp +++ b/include/boost/histogram/histogram_impl_static.hpp @@ -238,20 +238,18 @@ class histogram { inline void xlin_w(std::size_t &, std::size_t &, double &) const {} template - inline - typename disable_if>::type - xlin_w(std::size_t &idx, std::size_t &stride, double &x, - First &&first, Rest &&... rest) const { + inline typename disable_if>::type + xlin_w(std::size_t &idx, std::size_t &stride, double &x, First &&first, + Rest &&... rest) const { detail::xlin(idx, stride, fusion::at_c(axes_), std::forward(first)); return xlin_w(idx, stride, x, std::forward(rest)...); } template - inline - typename enable_if>::type - xlin_w(std::size_t &idx, std::size_t &stride, double &x, - First &&first, Rest &&... rest) const { + inline typename enable_if>::type + xlin_w(std::size_t &idx, std::size_t &stride, double &x, First &&first, + Rest &&... rest) const { x = first.value; return xlin_w(idx, stride, x, std::forward(rest)...); } @@ -260,20 +258,18 @@ class histogram { inline void xlin_n(std::size_t &, std::size_t &, unsigned &) const {} template - inline - typename disable_if>::type - xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, - First &&first, Rest &&... rest) const { + inline typename disable_if>::type + xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, First &&first, + Rest &&... rest) const { detail::xlin(idx, stride, fusion::at_c(axes_), std::forward(first)); return xlin_n(idx, stride, x, std::forward(rest)...); } template - inline - typename enable_if>::type - xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, - First&& first, Rest &&... rest) const { + inline typename enable_if>::type + xlin_n(std::size_t &idx, std::size_t &stride, unsigned &x, First &&first, + Rest &&... rest) const { x = first.value; return xlin_n(idx, stride, x, std::forward(rest)...); }