forked from boostorg/unordered
added pull to open-addressing containers (#309)
* added pull to open-addressing containers * added pull_tests.cpp * guarded pull against exceptions in mid init_type construction
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Fast open-addressing hash table.
|
||||
*
|
||||
* Copyright 2022-2024 Joaquin M Lopez Munoz.
|
||||
* Copyright 2022-2025 Joaquin M Lopez Munoz.
|
||||
* Copyright 2023 Christian Mazakas.
|
||||
* Copyright 2024 Braden Ganetsky.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
@@ -495,6 +495,14 @@ public:
|
||||
else return 0;
|
||||
}
|
||||
|
||||
BOOST_FORCEINLINE init_type pull(const_iterator pos)
|
||||
{
|
||||
BOOST_ASSERT(pos!=end());
|
||||
erase_on_exit e{*this,pos};
|
||||
(void)e;
|
||||
return type_policy::move(type_policy::value_from(*pos.p()));
|
||||
}
|
||||
|
||||
void swap(table& x)
|
||||
noexcept(noexcept(std::declval<super&>().swap(std::declval<super&>())))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user