Initialize failed_ in the other two constructors

This commit is contained in:
Peter Dimov
2021-06-13 05:05:31 +03:00
parent f6fb85d7d3
commit f8ab3df822

View File

@ -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<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) BOOST_NOEXCEPT:
val_( e ), cat_( 0 )
val_( e ), failed_( e != 0 ), cat_( 0 )
{
}