#ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_HPP #define SPROUT_DETAIL_CONTAINER_COMPLATE_HPP #include #include #include #include #include #include namespace sprout { namespace detail { template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size == sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate_2( Result const& result, Args const&... args ) { return sprout::remake_clone(result, sprout::size(result), args...); } template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size != sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate_2( Result const& result, Args const&... args ) { return container_complate_2(result, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args))); } template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size == sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate_1( Result const& result, typename sprout::fixed_container_traits::difference_type remain, Args const&... args ) { return sprout::remake_clone(result, sprout::size(result), args...); } template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size != sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate_1( Result const& result, typename sprout::fixed_container_traits::difference_type remain, Args const&... args ) { return remain != 0 ? container_complate_1(result, remain - 1, *sprout::next(sprout::fixed_begin(result), remain - 1), args...) : container_complate_2(result, args...) ; } template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size == sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate( Result const& result, Args const&... args ) { return sprout::remake_clone(result, sprout::size(result), args...); } template SPROUT_CONSTEXPR inline typename std::enable_if< sprout::fixed_container_traits::fixed_size != sizeof...(Args), typename sprout::fixed::result_of::algorithm::type >::type container_complate( Result const& result, Args const&... args ) { return container_complate_1(result, sprout::fixed_begin_offset(result), args...); } } // namespace detail } // namespace sprout #endif // #ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_HPP