Replace all usages of boost::addressof with their std counterpart

This commit is contained in:
Christian Mazakas
2023-09-27 12:01:46 -07:00
parent f1729bb8a1
commit 7aac692162
7 changed files with 24 additions and 24 deletions

View File

@ -29,7 +29,7 @@ struct archive_constructed:private noncopyable
template<class Archive>
archive_constructed(const char* name,Archive& ar,unsigned int version)
{
core::load_construct_data_adl(ar,boost::addressof(get()),version);
core::load_construct_data_adl(ar,std::addressof(get()),version);
BOOST_TRY{
ar>>core::make_nvp(name,get());
}

View File

@ -585,7 +585,7 @@ namespace boost {
BOOST_ASSERT(
this->get_node_allocator() == other.get_node_allocator());
if (this == boost::addressof(other)) {
if (this == std::addressof(other)) {
return *this;
}
@ -781,9 +781,9 @@ namespace boost {
void extract_node(iterator itb, node_pointer p) noexcept
{
node_pointer* pp = boost::addressof(itb->next);
node_pointer* pp = std::addressof(itb->next);
while ((*pp) != p)
pp = boost::addressof((*pp)->next);
pp = std::addressof((*pp)->next);
*pp = p->next;
if (!itb->next)
unlink_bucket(itb);

View File

@ -974,7 +974,7 @@ namespace boost {
reference operator*() const noexcept { return dereference(); }
pointer operator->() const noexcept
{
pointer x = boost::addressof(p->value());
pointer x = std::addressof(p->value());
return x;
}
@ -1082,7 +1082,7 @@ namespace boost {
reference operator*() const noexcept { return dereference(); }
pointer operator->() const noexcept
{
pointer x = boost::addressof(p->value());
pointer x = std::addressof(p->value());
return x;
}
@ -1735,8 +1735,8 @@ namespace boost {
{
if (size_ > 0) {
key_equal pred = this->key_eq();
for (node_pointer* pp = boost::addressof(itb->next); *pp;
pp = boost::addressof((*pp)->next)) {
for (node_pointer* pp = std::addressof(itb->next); *pp;
pp = std::addressof((*pp)->next)) {
if (pred(key, extractor::extract((*pp)->value()))) {
return pp;
}
@ -2201,9 +2201,9 @@ namespace boost {
++next;
bucket_iterator itb = pos.itb;
node_pointer* pp = boost::addressof(itb->next);
node_pointer* pp = std::addressof(itb->next);
while (*pp != pos.p) {
pp = boost::addressof((*pp)->next);
pp = std::addressof((*pp)->next);
}
buckets_.extract_node_after(itb, pp);
@ -2224,9 +2224,9 @@ namespace boost {
// each bucket group so we have to retrieve it manually by iterating
//
bucket_iterator itb = first.itb;
node_pointer* pp = boost::addressof(itb->next);
node_pointer* pp = std::addressof(itb->next);
while (*pp != first.p) {
pp = boost::addressof((*pp)->next);
pp = std::addressof((*pp)->next);
}
while (*pp != last.p) {
@ -2245,7 +2245,7 @@ namespace boost {
} else {
++itb;
}
pp = boost::addressof(itb->next);
pp = std::addressof(itb->next);
}
}
@ -2656,7 +2656,7 @@ namespace boost {
for (; itb != last;) {
bucket_iterator next_itb = itb;
++next_itb;
node_pointer* pp = boost::addressof(itb->next);
node_pointer* pp = std::addressof(itb->next);
while (*pp) {
node_pointer p = *pp;
buckets_.extract_node_after(itb, pp);

View File

@ -63,7 +63,7 @@ template<typename Set> struct load_or_save_unordered_set<Set,true> /* save */
ar<<core::make_nvp("value_version",value_version);
for(const_iterator first=x.begin(),last=x.end();first!=last;++first){
core::save_construct_data_adl(ar,boost::addressof(*first),value_version);
core::save_construct_data_adl(ar,std::addressof(*first),value_version);
ar<<core::make_nvp("item",*first);
serialization_track(ar,first);
}
@ -94,7 +94,7 @@ template<typename Set> struct load_or_save_unordered_set<Set,false> /* load */
x.insert(std::move(value.get())));
if(!p.second)throw_exception(bad_archive_exception());
ar.reset_object_address(
boost::addressof(*p.first),boost::addressof(value.get()));
std::addressof(*p.first),std::addressof(value.get()));
serialization_track(ar,p.first);
}
}
@ -129,10 +129,10 @@ template<typename Map> struct load_or_save_unordered_map<Map,true> /* save */
*/
core::save_construct_data_adl(
ar,boost::addressof(first->first),key_version);
ar,std::addressof(first->first),key_version);
ar<<core::make_nvp("key",first->first);
core::save_construct_data_adl(
ar,boost::addressof(first->second),mapped_version);
ar,std::addressof(first->second),mapped_version);
ar<<core::make_nvp("mapped",first->second);
serialization_track(ar,first);
}
@ -169,9 +169,9 @@ template<typename Map> struct load_or_save_unordered_map<Map,false> /* load */
x.emplace(std::move(key.get()),std::move(mapped.get())));
if(!p.second)throw_exception(bad_archive_exception());
ar.reset_object_address(
boost::addressof(p.first->first),boost::addressof(key.get()));
std::addressof(p.first->first),std::addressof(key.get()));
ar.reset_object_address(
boost::addressof(p.first->second),boost::addressof(mapped.get()));
std::addressof(p.first->second),std::addressof(mapped.get()));
serialization_track(ar,p.first);
}
}

View File

@ -536,7 +536,7 @@ public:
T& operator[](std::ptrdiff_t s) const { return ptr_[s]; }
bool operator!() const { return !ptr_; }
static ptr pointer_to(T& p) { return ptr(boost::addressof(p)); }
static ptr pointer_to(T& p) { return ptr(std::addressof(p)); }
// I'm not using the safe bool idiom because the containers should be
// able to cope with bool conversions.

View File

@ -339,7 +339,7 @@ namespace test {
bool operator!() const { return !ptr_; }
static ptr pointer_to(T& p) {
return ptr(boost::addressof(p));
return ptr(std::addressof(p));
}
// I'm not using the safe bool idiom because the containers should be

View File

@ -451,14 +451,14 @@ namespace rehash_tests {
typedef typename X::iterator iterator;
for (iterator pos = x.begin(); pos != x.end(); ++pos) {
elements.insert(boost::addressof(*pos));
elements.insert(std::addressof(*pos));
}
x.rehash(2 * x.bucket_count());
for (iterator pos = x.begin(); pos != x.end(); ++pos) {
if (!BOOST_TEST(
elements.find(boost::addressof(*pos)) != elements.end())) {
elements.find(std::addressof(*pos)) != elements.end())) {
break;
}
}