#ifndef SPROUT_ALGORITHM_FIXED_FILL_HPP #define SPROUT_ALGORITHM_FIXED_FILL_HPP #include #include #include #include #include #include #include namespace sprout { namespace fixed { namespace detail { template SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm::type fill_impl( Container const& cont, T const& value, sprout::index_tuple, typename sprout::fixed_container_traits::difference_type offset, typename sprout::fixed_container_traits::size_type size ) { return sprout::remake_clone( cont, sprout::size(cont), (Indexes >= offset && Indexes < offset + size ? value : *sprout::next(sprout::fixed_begin(cont), Indexes) )... ); } } // namespace detail // // fill // template SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm::type fill( Container const& cont, T const& value ) { return sprout::fixed::detail::fill_impl( cont, value, typename sprout::index_range<0, sprout::fixed_container_traits::fixed_size>::type(), sprout::fixed_begin_offset(cont), sprout::size(cont) ); } } // namespace fixed using sprout::fixed::fill; } // namespace sprout #endif // #ifndef SPROUT_ALGORITHM_FIXED_FILL_HPP