#ifndef SPROUT_OPTIONAL_GET_HPP #define SPROUT_OPTIONAL_GET_HPP #include #include namespace sprout { // // get // template inline SPROUT_CONSTEXPR typename sprout::optional::reference_const_type get(sprout::optional const& x) { return x.get(); } template inline typename sprout::optional::reference_type get(sprout::optional& x) { return x.get(); } template inline SPROUT_CONSTEXPR typename sprout::optional::pointer_const_type get(sprout::optional const* x) { return x->get_ptr(); } template inline typename sprout::optional::pointer_type get(sprout::optional* x) { return x->get_ptr(); } // // get_pointer // template inline SPROUT_CONSTEXPR typename sprout::optional::pointer_const_type get_pointer(sprout::optional const& x) { return x.get_pointer(); } template inline typename sprout::optional::pointer_type get_pointer(sprout::optional& x) { return x.get_pointer(); } // // get_optional_value_or // template inline SPROUT_CONSTEXPR typename sprout::optional::reference_const_type get_optional_value_or(sprout::optional const& x, typename sprout::optional::reference_const_type v) { return x.get_value_or(v); } template inline typename sprout::optional::reference_type get_optional_value_or(sprout::optional& x, typename sprout::optional::reference_type v) { return x.get_value_or(v); } } // namespace sprout #endif // #ifndef SPROUT_OPTIONAL_GET_HPP