#ifndef SPROUT_OPERATION_FIXED_SET_HPP #define SPROUT_OPERATION_FIXED_SET_HPP #include #include #include #include #include #include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL namespace sprout { namespace fixed { namespace result_of { // // set // template struct set { public: typedef typename sprout::fixed_container_traits::clone_type type; }; } // namespace result_of namespace detail { template SPROUT_CONSTEXPR inline Result set_impl( Container const& cont, sprout::index_tuple, typename sprout::fixed_container_traits::difference_type pos, T const& v ) { return sprout::remake_clone( cont, sprout::size(cont), (Indexes != pos ? *sprout::next(sprout::fixed_begin(cont), Indexes) : v )... ); } } // namespace detail // // set // template SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::set::type set( Container const& cont, typename sprout::fixed_container_traits::const_iterator pos, T const& v ) { return sprout::fixed::detail::set_impl::type>( cont, typename sprout::index_range<0, sprout::fixed_container_traits::type>::fixed_size>::type(), NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), pos), v ); } // // set // template SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::set::type set( Container const& cont, typename sprout::fixed_container_traits::difference_type pos, T const& v ) { return sprout::fixed::detail::set_impl::type>( cont, typename sprout::index_range<0, sprout::fixed_container_traits::type>::fixed_size>::type(), NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), sprout::next(sprout::begin(cont), pos)), v ); } } // namespace fixed namespace result_of { using sprout::fixed::result_of::set; } // namespace result_of using sprout::fixed::set; } // namespace sprout #endif // #ifndef SPROUT_OPERATION_FIXED_SET_HPP