diff --git a/sprout/numeric/fixed/adjacent_difference.hpp b/sprout/numeric/fixed/adjacent_difference.hpp index 97184fd6..ff5a0a9a 100644 --- a/sprout/numeric/fixed/adjacent_difference.hpp +++ b/sprout/numeric/fixed/adjacent_difference.hpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,7 +89,6 @@ namespace sprout { adjacent_difference(InputIterator first, InputIterator last, Result const& result) { return sprout::fixed::detail::adjacent_difference_impl(first, last, result, sprout::size(result)); } - template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type adjacent_difference(InputIterator first, InputIterator last) { @@ -162,7 +163,6 @@ namespace sprout { adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { return sprout::fixed::detail::adjacent_difference_impl(first, last, result, binary_op, sprout::size(result)); } - template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type adjacent_difference(InputIterator first, InputIterator last, BinaryOperation binary_op) { @@ -170,7 +170,33 @@ namespace sprout { } } // namespace fixed - using sprout::fixed::adjacent_difference; + template< + typename InputIterator, typename Result, + typename sprout::enabler_if::value>::type = sprout::enabler + > + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + adjacent_difference(InputIterator first, InputIterator last, Result const& result) { + return sprout::fixed::adjacent_difference(first, last, result); + } + template + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + adjacent_difference(InputIterator first, InputIterator last) { + return sprout::fixed::adjacent_difference(first, last); + } + + template< + typename InputIterator, typename Result, typename BinaryOperation, + typename sprout::enabler_if::value>::type = sprout::enabler + > + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { + return sprout::fixed::adjacent_difference(first, last, result, binary_op); + } + template + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + adjacent_difference(InputIterator first, InputIterator last, BinaryOperation binary_op) { + return sprout::fixed::adjacent_difference(first, last, binary_op); + } } // namespace sprout #endif // #ifndef SPROUT_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP diff --git a/sprout/numeric/fixed/partial_sum.hpp b/sprout/numeric/fixed/partial_sum.hpp index e0d64459..6f8f68c6 100644 --- a/sprout/numeric/fixed/partial_sum.hpp +++ b/sprout/numeric/fixed/partial_sum.hpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,7 +89,6 @@ namespace sprout { partial_sum(InputIterator first, InputIterator last, Result const& result) { return sprout::fixed::detail::partial_sum_impl(first, last, result, sprout::size(result)); } - template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type partial_sum(InputIterator first, InputIterator last) { @@ -162,7 +163,6 @@ namespace sprout { partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { return sprout::fixed::detail::partial_sum_impl(first, last, result, binary_op, sprout::size(result)); } - template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type partial_sum(InputIterator first, InputIterator last, BinaryOperation binary_op) { @@ -170,7 +170,33 @@ namespace sprout { } } // namespace fixed - using sprout::fixed::partial_sum; + template< + typename InputIterator, typename Result, + typename sprout::enabler_if::value>::type = sprout::enabler + > + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + partial_sum(InputIterator first, InputIterator last, Result const& result) { + return sprout::fixed::partial_sum(first, last, result); + } + template + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + partial_sum(InputIterator first, InputIterator last) { + return sprout::fixed::partial_sum(first, last); + } + + template< + typename InputIterator, typename Result, typename BinaryOperation, + typename sprout::enabler_if::value>::type = sprout::enabler + > + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { + return sprout::fixed::partial_sum(first, last, result, binary_op); + } + template + inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type + partial_sum(InputIterator first, InputIterator last, BinaryOperation binary_op) { + return sprout::fixed::partial_sum(first, last, binary_op); + } } // namespace sprout #endif // #ifndef SPROUT_NUMERIC_FIXED_PARTIAL_SUM_HPP