Add missing hasher and key_type typedefs to C++11 STL containers

This commit is contained in:
William S Fulton 2019-03-12 21:59:03 +00:00
commit f58a6dade3
4 changed files with 14 additions and 5 deletions

View file

@ -75,6 +75,8 @@ namespace std {
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef _Hash hasher;
typedef _Compare key_equal;
typedef _Alloc allocator_type;
%traits_swigtype(_Key);

View file

@ -53,6 +53,8 @@ namespace std {
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef _Hash hasher;
typedef _Compare key_equal;
typedef _Alloc allocator_type;
%traits_swigtype(_Key);

View file

@ -40,9 +40,10 @@ namespace std {
//unordered_multiset
template <class _Key, class _Hash = std::hash< _Key >,
template <class _Key,
class _Hash = std::hash< _Key >,
class _Compare = std::equal_to< _Key >,
class _Alloc = allocator< _Key > >
class _Alloc = allocator< _Key > >
class unordered_multiset {
public:
typedef size_t size_type;
@ -53,6 +54,8 @@ namespace std {
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef _Hash hasher;
typedef _Compare key_equal;
typedef _Alloc allocator_type;
%traits_swigtype(_Key);

View file

@ -74,20 +74,22 @@
namespace std {
template <class _Key, class _Hash = std::hash< _Key >,
template <class _Key,
class _Hash = std::hash< _Key >,
class _Compare = std::equal_to< _Key >,
class _Alloc = allocator< _Key > >
class _Alloc = allocator< _Key > >
class unordered_set {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Hash hasher;
typedef _Key value_type;
typedef _Key key_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef _Hash hasher;
typedef _Compare key_equal;
typedef _Alloc allocator_type;
%traits_swigtype(_Key);