/*============================================================================= Copyright (c) 2011-2016 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_OPTIONAL_MAKE_OPTIONAL_HPP #define SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP #include #include #include #include namespace sprout { // // make_optional // template inline SPROUT_CONSTEXPR sprout::optional::type> make_optional(T&& v) { return sprout::optional::type>(SPROUT_FORWARD(T, v)); } template inline SPROUT_CONSTEXPR sprout::optional::type> make_optional(bool cond, T&& v) { return sprout::optional::type>(cond, SPROUT_FORWARD(T, v)); } } // namespace sprout #endif // #ifndef SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP