mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 11:57:15 +02:00
Fix unordered for intel strict.
[SVN r57139]
This commit is contained in:
@ -28,7 +28,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
node_ptr it1 = i->next_;
|
node_ptr it1 = i->next_;
|
||||||
while(BOOST_UNORDERED_BORLAND_BOOL(it1))
|
while(BOOST_UNORDERED_BORLAND_BOOL(it1))
|
||||||
{
|
{
|
||||||
node_ptr it2 = other.find_iterator(get_key_from_ptr(it1));
|
node_ptr it2 = other.find_iterator(this->get_key_from_ptr(it1));
|
||||||
if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
|
if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
|
||||||
|
|
||||||
node_ptr end1 = node::next_group(it1);
|
node_ptr end1 = node::next_group(it1);
|
||||||
@ -77,7 +77,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
hash_equivalent_table<H, P, A, K>::iterator_base
|
hash_equivalent_table<H, P, A, K>::iterator_base
|
||||||
hash_equivalent_table<H, P, A, K>::emplace_impl(node_constructor& a)
|
hash_equivalent_table<H, P, A, K>::emplace_impl(node_constructor& a)
|
||||||
{
|
{
|
||||||
key_type const& k = get_key(a.value());
|
key_type const& k = this->get_key(a.value());
|
||||||
std::size_t hash_value = this->hash_function()(k);
|
std::size_t hash_value = this->hash_function()(k);
|
||||||
|
|
||||||
if(!this->size_) {
|
if(!this->size_) {
|
||||||
@ -85,7 +85,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
||||||
node_ptr position = find_iterator(bucket, k);
|
node_ptr position = this->find_iterator(bucket, k);
|
||||||
|
|
||||||
// reserve has basic exception safety if the hash function
|
// reserve has basic exception safety if the hash function
|
||||||
// throws, strong otherwise.
|
// throws, strong otherwise.
|
||||||
@ -100,9 +100,9 @@ namespace boost { namespace unordered_detail {
|
|||||||
inline void hash_equivalent_table<H, P, A, K>
|
inline void hash_equivalent_table<H, P, A, K>
|
||||||
::emplace_impl_no_rehash(node_constructor& a)
|
::emplace_impl_no_rehash(node_constructor& a)
|
||||||
{
|
{
|
||||||
key_type const& k = get_key(a.value());
|
key_type const& k = this->get_key(a.value());
|
||||||
bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
|
bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
|
||||||
add_node(a, bucket, find_iterator(bucket, k));
|
add_node(a, bucket, this->find_iterator(bucket, k));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||||
|
@ -28,7 +28,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
node_ptr it1 = i->next_;
|
node_ptr it1 = i->next_;
|
||||||
while(BOOST_UNORDERED_BORLAND_BOOL(it1))
|
while(BOOST_UNORDERED_BORLAND_BOOL(it1))
|
||||||
{
|
{
|
||||||
node_ptr it2 = other.find_iterator(get_key_from_ptr(it1));
|
node_ptr it2 = other.find_iterator(this->get_key_from_ptr(it1));
|
||||||
if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
|
if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
|
||||||
if(!extractor::compare_mapped(
|
if(!extractor::compare_mapped(
|
||||||
node::get_value(it1), node::get_value(it2)))
|
node::get_value(it1), node::get_value(it2)))
|
||||||
@ -76,7 +76,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
return *this->emplace_empty_impl_with_node(a, 1);
|
return *this->emplace_empty_impl_with_node(a, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
node_ptr pos = find_iterator(bucket, k);
|
node_ptr pos = this->find_iterator(bucket, k);
|
||||||
|
|
||||||
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
||||||
return node::get_value(pos);
|
return node::get_value(pos);
|
||||||
@ -102,14 +102,13 @@ namespace boost { namespace unordered_detail {
|
|||||||
|
|
||||||
template <class H, class P, class A, class K>
|
template <class H, class P, class A, class K>
|
||||||
inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
|
inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
|
||||||
hash_unique_table<H, P, A, K>
|
hash_unique_table<H, P, A, K>::emplace_impl_with_node(node_constructor& a)
|
||||||
::emplace_impl_with_node(node_constructor& a)
|
|
||||||
{
|
{
|
||||||
// No side effects in this initial code
|
// No side effects in this initial code
|
||||||
key_type const& k = get_key(a.value());
|
key_type const& k = this->get_key(a.value());
|
||||||
std::size_t hash_value = this->hash_function()(k);
|
std::size_t hash_value = this->hash_function()(k);
|
||||||
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
||||||
node_ptr pos = find_iterator(bucket, k);
|
node_ptr pos = this->find_iterator(bucket, k);
|
||||||
|
|
||||||
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
||||||
// Found an existing key, return it (no throw).
|
// Found an existing key, return it (no throw).
|
||||||
@ -139,7 +138,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
// No side effects in this initial code
|
// No side effects in this initial code
|
||||||
std::size_t hash_value = this->hash_function()(k);
|
std::size_t hash_value = this->hash_function()(k);
|
||||||
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
||||||
node_ptr pos = find_iterator(bucket, k);
|
node_ptr pos = this->find_iterator(bucket, k);
|
||||||
|
|
||||||
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
||||||
// Found an existing key, return it (no throw).
|
// Found an existing key, return it (no throw).
|
||||||
@ -203,7 +202,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
std::size_t hash_value = this->hash_function()(k); \
|
std::size_t hash_value = this->hash_function()(k); \
|
||||||
bucket_ptr bucket \
|
bucket_ptr bucket \
|
||||||
= this->bucket_ptr_from_hash(hash_value); \
|
= this->bucket_ptr_from_hash(hash_value); \
|
||||||
node_ptr pos = find_iterator(bucket, k); \
|
node_ptr pos = this->find_iterator(bucket, k); \
|
||||||
\
|
\
|
||||||
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) { \
|
if (BOOST_UNORDERED_BORLAND_BOOL(pos)) { \
|
||||||
return emplace_return(iterator_base(bucket, pos), false); \
|
return emplace_return(iterator_base(bucket, pos), false); \
|
||||||
@ -330,7 +329,7 @@ namespace boost { namespace unordered_detail {
|
|||||||
key_type const& k = extractor::extract(*i);
|
key_type const& k = extractor::extract(*i);
|
||||||
std::size_t hash_value = this->hash_function()(k);
|
std::size_t hash_value = this->hash_function()(k);
|
||||||
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
|
||||||
node_ptr pos = find_iterator(bucket, k);
|
node_ptr pos = this->find_iterator(bucket, k);
|
||||||
|
|
||||||
if (!BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
if (!BOOST_UNORDERED_BORLAND_BOOL(pos)) {
|
||||||
// Doesn't already exist, add to bucket.
|
// Doesn't already exist, add to bucket.
|
||||||
|
@ -8,7 +8,7 @@ import testing ;
|
|||||||
project unordered-test/unordered
|
project unordered-test/unordered
|
||||||
: requirements
|
: requirements
|
||||||
<warnings>all
|
<warnings>all
|
||||||
<toolset>intel:<warnings>on
|
<toolset>intel:<warnings>on <cxxflags>-strict_ansi
|
||||||
<toolset>msvc:<cxxflags>/W4
|
<toolset>msvc:<cxxflags>/W4
|
||||||
<toolset>gcc:<cxxflags>"-Wsign-promo -Wunused-parameter"
|
<toolset>gcc:<cxxflags>"-Wsign-promo -Wunused-parameter"
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user