mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 06:06:08 +00:00
N3644 support for <unordered_set> and <unordered_map>
llvm-svn: 187915
This commit is contained in:
parent
acfbbd77f8
commit
2c1a894061
@ -112,6 +112,9 @@ public:
|
||||
pointer;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
: __node_(nullptr)
|
||||
#endif
|
||||
{
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 2
|
||||
__get_db()->__insert_i(this);
|
||||
@ -248,6 +251,9 @@ public:
|
||||
typedef __hash_iterator<__non_const_node_pointer> __non_const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
: __node_(nullptr)
|
||||
#endif
|
||||
{
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 2
|
||||
__get_db()->__insert_i(this);
|
||||
|
@ -108,4 +108,18 @@ int main()
|
||||
C::const_iterator i;
|
||||
}
|
||||
#endif
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{ // N3664 testing
|
||||
typedef std::unordered_map<int,double> C;
|
||||
C::iterator ii1{}, ii2{};
|
||||
C::iterator ii4 = ii1;
|
||||
C::const_iterator cii{};
|
||||
assert ( ii1 == ii2 );
|
||||
assert ( ii1 == ii4 );
|
||||
assert ( ii1 == cii );
|
||||
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -114,4 +114,18 @@ int main()
|
||||
C::const_iterator i;
|
||||
}
|
||||
#endif
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{ // N3664 testing
|
||||
typedef std::unordered_multimap<int,double> C;
|
||||
C::iterator ii1{}, ii2{};
|
||||
C::iterator ii4 = ii1;
|
||||
C::const_iterator cii{};
|
||||
assert ( ii1 == ii2 );
|
||||
assert ( ii1 == ii4 );
|
||||
assert ( ii1 == cii );
|
||||
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -107,4 +107,18 @@ int main()
|
||||
C::const_iterator i;
|
||||
}
|
||||
#endif
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{ // N3664 testing
|
||||
typedef std::unordered_multiset<int> C;
|
||||
C::iterator ii1{}, ii2{};
|
||||
C::iterator ii4 = ii1;
|
||||
C::const_iterator cii{};
|
||||
assert ( ii1 == ii2 );
|
||||
assert ( ii1 == ii4 );
|
||||
assert ( ii1 == cii );
|
||||
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -107,4 +107,18 @@ int main()
|
||||
C::const_iterator i;
|
||||
}
|
||||
#endif
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{ // N3664 testing
|
||||
typedef std::unordered_set<int> C;
|
||||
C::iterator ii1{}, ii2{};
|
||||
C::iterator ii4 = ii1;
|
||||
C::const_iterator cii{};
|
||||
assert ( ii1 == ii2 );
|
||||
assert ( ii1 == ii4 );
|
||||
assert ( ii1 == cii );
|
||||
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user