#include <bits/hashtable_policy.h>
#include <bits/enable_special_members.h>
+#include <bits/stl_algobase.h> // fill_n
#include <bits/stl_function.h> // __has_is_transparent_t
#if __cplusplus > 201402L
# include <bits/node_handle.h>
_M_bucket_count = __ht._M_bucket_count;
}
else
- __builtin_memset(_M_buckets, 0,
- _M_bucket_count * sizeof(__node_base_ptr));
+ std::fill_n(_M_buckets, _M_bucket_count, nullptr);
__try
{
_M_buckets = __former_buckets;
_M_bucket_count = __former_bucket_count;
}
- __builtin_memset(_M_buckets, 0,
- _M_bucket_count * sizeof(__node_base_ptr));
+ std::fill_n(_M_buckets, _M_bucket_count, nullptr);
__throw_exception_again;
}
}
clear() noexcept
{
this->_M_deallocate_nodes(_M_begin());
- __builtin_memset(_M_buckets, 0,
- _M_bucket_count * sizeof(__node_base_ptr));
+ std::fill_n(_M_buckets, _M_bucket_count, nullptr);
_M_element_count = 0;
_M_before_begin._M_nxt = nullptr;
}