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