Add definitions of ::in_place_* for result specializations. Fixes #115.

This commit is contained in:
Peter Dimov
2023-12-15 03:17:21 +02:00
parent 18edbf75d0
commit 2aa5d4d97f

View File

@ -659,6 +659,13 @@ public:
}
};
#if defined(BOOST_NO_CXX17_INLINE_VARIABLES)
template<class E> constexpr in_place_value_t result<void, E>::in_place_value;
template<class E> constexpr in_place_error_t result<void, E>::in_place_error;
#endif
template<class Ch, class Tr, class E> std::basic_ostream<Ch, Tr>& operator<<( std::basic_ostream<Ch, Tr>& os, result<void, E> const & r )
{
if( r.has_value() )
@ -892,6 +899,13 @@ public:
}
};
#if defined(BOOST_NO_CXX17_INLINE_VARIABLES)
template<class U, class E> constexpr in_place_value_t result<U&, E>::in_place_value;
template<class U, class E> constexpr in_place_error_t result<U&, E>::in_place_error;
#endif
// operator|
namespace detail