mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 20:04:29 +02:00
Add missing [[nodiscard]]
qualifiers as outlined by C++20
This commit is contained in:
@@ -210,7 +210,10 @@ namespace boost {
|
|||||||
|
|
||||||
// size and capacity
|
// size and capacity
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return table_.size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
||||||
|
|
||||||
@@ -1177,7 +1180,10 @@ namespace boost {
|
|||||||
|
|
||||||
// size and capacity
|
// size and capacity
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return table_.size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
||||||
|
|
||||||
@@ -2705,7 +2711,10 @@ namespace boost {
|
|||||||
|
|
||||||
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return ptr_ ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
void swap(node_handle_map& n) BOOST_NOEXCEPT_IF(
|
void swap(node_handle_map& n) BOOST_NOEXCEPT_IF(
|
||||||
value_allocator_traits::propagate_on_container_swap::value ||
|
value_allocator_traits::propagate_on_container_swap::value ||
|
||||||
|
@@ -208,7 +208,10 @@ namespace boost {
|
|||||||
|
|
||||||
// size and capacity
|
// size and capacity
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return table_.size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
||||||
|
|
||||||
@@ -835,7 +838,10 @@ namespace boost {
|
|||||||
|
|
||||||
// size and capacity
|
// size and capacity
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return table_.size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
||||||
|
|
||||||
@@ -2169,7 +2175,10 @@ namespace boost {
|
|||||||
|
|
||||||
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
||||||
|
|
||||||
bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
BOOST_ATTRIBUTE_NODISCARD bool empty() const BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return ptr_ ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
void swap(node_handle_set& n) BOOST_NOEXCEPT_IF(
|
void swap(node_handle_set& n) BOOST_NOEXCEPT_IF(
|
||||||
value_allocator_traits::propagate_on_container_swap::value ||
|
value_allocator_traits::propagate_on_container_swap::value ||
|
||||||
|
Reference in New Issue
Block a user