diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 0e948b89..d78ad5fd 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -2253,7 +2252,10 @@ namespace boost { allocator_type get_allocator() const { return *alloc_; } - BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() + BOOST_FORCEINLINE explicit operator bool() const noexcept + { + return !this->operator!(); + } bool operator!() const noexcept { return ptr_ ? 0 : 1; } diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 98ce4eca..a2d8304d 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -1876,7 +1875,10 @@ namespace boost { allocator_type get_allocator() const { return *alloc_; } - BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() + BOOST_FORCEINLINE explicit operator bool() const noexcept + { + return !this->operator!(); + } bool operator!() const noexcept { return ptr_ ? 0 : 1; }