Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions libcxx/include/unordered_map
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,8 @@ private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef __unordered_map_hasher<key_type, value_type, hasher, key_equal> __hasher;
typedef __unordered_map_equal<key_type, value_type, key_equal, hasher> __key_equal;
typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;

typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table;
typedef __hash_table<__value_type, __hasher, __key_equal, allocator_type> __table;

__table __table_;

Expand Down Expand Up @@ -1777,9 +1776,8 @@ private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef __unordered_map_hasher<key_type, value_type, hasher, key_equal> __hasher;
typedef __unordered_map_equal<key_type, value_type, key_equal, hasher> __key_equal;
typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;

typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table;
typedef __hash_table<__value_type, __hasher, __key_equal, allocator_type> __table;

__table __table_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <map>

#include "min_allocator.h"
#include "test_macros.h"

struct A {
Expand All @@ -28,5 +29,8 @@ inline bool operator<(A const& L, A const& R) { return L.data < R.data; }
int main(int, char**) {
A a;

// Make sure that the allocator isn't rebound to and incomplete type
std::multimap<int, int, std::less<int>, complete_type_allocator<std::pair<const int, int> > > m;

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <unordered_map>

#include "min_allocator.h"
#include "test_macros.h"

template <class Tp>
Expand All @@ -36,5 +37,9 @@ inline bool operator==(A const& L, A const& R) { return &L == &R; }
int main(int, char**) {
A a;

// Make sure that the allocator isn't rebound to an incomplete type
std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, complete_type_allocator<std::pair<const int, int> > >
m;

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <unordered_map>

#include "min_allocator.h"
#include "test_macros.h"

template <class Tp>
Expand All @@ -36,5 +37,13 @@ inline bool operator==(A const& L, A const& R) { return &L == &R; }
int main(int, char**) {
A a;

// Make sure that the allocator isn't rebound to an incomplete type
std::unordered_multimap<int,
int,
std::hash<int>,
std::equal_to<int>,
complete_type_allocator<std::pair<const int, int> > >
m;

return 0;
}
Loading