#ifndef SPROUT_RANDOM_ITERATOR_HPP #define SPROUT_RANDOM_ITERATOR_HPP #include #include #include #include namespace sprout { namespace random { // // begin // template< typename Engine, typename Distribution, typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR auto begin( Engine const& engine, Distribution const& distribution, typename sprout::generator_iterator::type>::difference_type count = -1 ) -> sprout::generator_iterator::type> { return sprout::generator_iterator::type>(distribution(engine), count); } template inline SPROUT_CONSTEXPR auto begin( Engine const& engine, typename sprout::generator_iterator::type>::difference_type count = -1 ) -> sprout::generator_iterator::type> { return sprout::generator_iterator::type>(engine(), count); } // // end // template< typename Engine, typename Distribution, typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR auto end(Engine const& engine, Distribution const& distribution) -> sprout::generator_iterator::type> { return sprout::generator_iterator::type>(); } template inline SPROUT_CONSTEXPR auto end(Engine const& engine) -> sprout::generator_iterator::type> { return sprout::generator_iterator::type>(); } } // namespace random } // namespace sprout #endif // #ifndef SPROUT_RANDOM_ITERATOR_HPP