diff --git a/sprout/algorithm/fixed/copy.hpp b/sprout/algorithm/fixed/copy.hpp index 28c3d599..dee70dde 100644 --- a/sprout/algorithm/fixed/copy.hpp +++ b/sprout/algorithm/fixed/copy.hpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -64,7 +63,7 @@ namespace sprout { sprout::container_traits::static_size == sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type - copy_impl_fw( + copy_impl( InputIterator, InputIterator, Result const& result, typename sprout::container_traits::size_type, Args const&... args @@ -77,14 +76,14 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type - copy_impl_fw( + copy_impl( InputIterator first, InputIterator last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) { return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::copy_impl_fw(sprout::next(first), last, result, size, args..., *first) + ? sprout::fixed::detail::copy_impl(sprout::next(first), last, result, size, args..., *first) : sprout::detail::container_complate(result, args...) ; } @@ -92,67 +91,10 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm::type copy( InputIterator first, InputIterator last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::copy_impl_fw(first, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::result_of::algorithm::type - >::type - copy_impl_in( - sprout::next_iterator const& first, InputIterator, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., *first); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::result_of::algorithm::type - >::type - copy_impl_in( - sprout::next_iterator const& first, InputIterator last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first.base() != last && sizeof...(Args) + 1 < size - ? sprout::fixed::detail::copy_impl_in(sprout::next(first), last, result, size, args..., *first) - : sprout::detail::container_complate(result, args..., *first) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::result_of::algorithm::type - >::type - copy( - InputIterator, InputIterator, Result const& result, std::input_iterator_tag* ) { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::result_of::algorithm::type - >::type - copy( - InputIterator first, InputIterator last, Result const& result, - std::input_iterator_tag* - ) - { - return first != last - ? sprout::fixed::detail::copy_impl_in(sprout::make_next_iterator(first), last, result, sprout::size(result)) - : sprout::detail::container_complate(result) - ; + return sprout::fixed::detail::copy_impl(first, last, result, sprout::size(result)); } template