/*============================================================================= Copyright (c) 2011-2014 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_RANDOM_RESULTS_HPP #define SPROUT_RANDOM_RESULTS_HPP #include #include #include #include namespace sprout { namespace random { // // result // template inline SPROUT_CONSTEXPR decltype(sprout::generators::generated_value(std::declval())) result(T&& t) SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generated_value(std::declval())) { return sprout::generators::generated_value(SPROUT_FORWARD(T, t)); } // // next // template inline SPROUT_CONSTEXPR decltype(sprout::generators::next_generator(std::declval())) next(T&& t) SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::next_generator(std::declval())) { return sprout::generators::next_generator(SPROUT_FORWARD(T, t)); } } // namespace random } // namespace sprout #endif // #ifndef SPROUT_RANDOM_RESULTS_HPP