From f58a6dade3b0c13626af271d3d054dc6076d8e0d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 12 Mar 2019 21:59:03 +0000 Subject: [PATCH] Add missing hasher and key_type typedefs to C++11 STL containers --- Lib/std/std_unordered_map.i | 2 ++ Lib/std/std_unordered_multimap.i | 2 ++ Lib/std/std_unordered_multiset.i | 7 +++++-- Lib/std/std_unordered_set.i | 8 +++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Lib/std/std_unordered_map.i b/Lib/std/std_unordered_map.i index 723c0232d..1fd1eb980 100644 --- a/Lib/std/std_unordered_map.i +++ b/Lib/std/std_unordered_map.i @@ -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); diff --git a/Lib/std/std_unordered_multimap.i b/Lib/std/std_unordered_multimap.i index f2855343d..4be6aa492 100644 --- a/Lib/std/std_unordered_multimap.i +++ b/Lib/std/std_unordered_multimap.i @@ -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); diff --git a/Lib/std/std_unordered_multiset.i b/Lib/std/std_unordered_multiset.i index 8effa586e..2910fb6ff 100644 --- a/Lib/std/std_unordered_multiset.i +++ b/Lib/std/std_unordered_multiset.i @@ -40,9 +40,10 @@ namespace std { //unordered_multiset - template , + template , 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); diff --git a/Lib/std/std_unordered_set.i b/Lib/std/std_unordered_set.i index d7fc24a22..91e807423 100644 --- a/Lib/std/std_unordered_set.i +++ b/Lib/std/std_unordered_set.i @@ -74,20 +74,22 @@ namespace std { - template , + template , 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);