From b507b2294e0de66c3f84e647a011c5b74fef3101 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 16 Sep 2021 03:12:20 +0300 Subject: [PATCH] Unbreak the loc == 0 case, even though the specification disallows it --- include/boost/system/detail/error_code.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index 5cba48d..5756c8d 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -105,7 +105,7 @@ public: } error_code( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT: - d1_(), lc_flags_( reinterpret_cast( loc ) | +detail::failed_impl( val, cat ) ) + d1_(), lc_flags_( ( loc? reinterpret_cast( loc ): 2 ) | +detail::failed_impl( val, cat ) ) { d1_.val_ = val; d1_.cat_ = &cat;