From 2aa5d4d97f47e57140f6cd9d753ef391cd8df0e3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 15 Dec 2023 03:17:21 +0200 Subject: [PATCH] Add definitions of ::in_place_* for result specializations. Fixes #115. --- include/boost/system/result.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/system/result.hpp b/include/boost/system/result.hpp index db09455..762afa3 100644 --- a/include/boost/system/result.hpp +++ b/include/boost/system/result.hpp @@ -659,6 +659,13 @@ public: } }; +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) + +template constexpr in_place_value_t result::in_place_value; +template constexpr in_place_error_t result::in_place_error; + +#endif + template std::basic_ostream& operator<<( std::basic_ostream& os, result const & r ) { if( r.has_value() ) @@ -892,6 +899,13 @@ public: } }; +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) + +template constexpr in_place_value_t result::in_place_value; +template constexpr in_place_error_t result::in_place_error; + +#endif + // operator| namespace detail