Drop explicit bool idiom

This commit is contained in:
Andrzej Krzemienski
2024-08-15 10:57:03 +02:00
parent 794e03af30
commit 6ec468aff6
3 changed files with 2 additions and 5 deletions

View File

@ -160,8 +160,7 @@ public:
throw_exception(bad_optional_access());
}
bool operator!() const BOOST_NOEXCEPT { return ptr_ == 0; }
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
explicit operator bool() const BOOST_NOEXCEPT { return ptr_ != 0; }
void reset() BOOST_NOEXCEPT { ptr_ = 0; }