From f8ab3df82217a6a0c5b58e00849808ea6962c8d0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 13 Jun 2021 05:05:31 +0300 Subject: [PATCH] Initialize failed_ in the other two constructors --- include/boost/system/detail/error_condition.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/system/detail/error_condition.hpp b/include/boost/system/detail/error_condition.hpp index 62e310f..5232189 100644 --- a/include/boost/system/detail/error_condition.hpp +++ b/include/boost/system/detail/error_condition.hpp @@ -63,7 +63,7 @@ public: } BOOST_SYSTEM_CONSTEXPR explicit error_condition( boost::system::detail::generic_value_tag vt ) BOOST_NOEXCEPT: - val_( vt.value ), cat_( 0 ) + val_( vt.value ), failed_( vt.value != 0 ), cat_( 0 ) { } @@ -77,7 +77,7 @@ public: template BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e, typename detail::enable_if::value>::type* = 0) BOOST_NOEXCEPT: - val_( e ), cat_( 0 ) + val_( e ), failed_( e != 0 ), cat_( 0 ) { }