#ifndef SPROUT_NUMERIC_FIXED_IOTA_HPP #define SPROUT_NUMERIC_FIXED_IOTA_HPP #include #include #include #include #include #include namespace sprout { namespace fixed { namespace detail { template inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm::type iota_impl( Container const& cont, sprout::index_tuple, T value, 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 + (Indexes - offset) : *sprout::next(sprout::internal_begin(cont), Indexes) )... ); } } // namespace detail // // iota // template inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm::type iota( Container const& cont, T value ) { return sprout::fixed::detail::iota_impl( cont, typename sprout::index_range<0, sprout::container_traits::static_size>::type(), value, sprout::internal_begin_offset(cont), sprout::size(cont) ); } } // namespace fixed using sprout::fixed::iota; } // namespace sprout #endif // #ifndef SPROUT_NUMERIC_FIXED_IOTA_HPP