#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(v)); } template inline SPROUT_CONSTEXPR sprout::optional::type> make_optional(bool cond, T&& v) { return sprout::optional::type>(cond, sprout::forward(v)); } } // namespace sprout #endif // #ifndef SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP