diff --git a/CHANGES.current b/CHANGES.current index 70f13c05f..b24242a34 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.0.0 (in progress) =========================== +2018-06-09: vadz + [Java] Allow exporting std::map using non-default comparison function. + 2018-06-08: philippkraft [Python] Stop exposing _swigregister to Python. It's not useful for user Python code to call this, and it just clutters the diff --git a/Lib/java/std_map.i b/Lib/java/std_map.i index 2405571fa..a94a99576 100644 --- a/Lib/java/std_map.i +++ b/Lib/java/std_map.i @@ -18,21 +18,21 @@ namespace std { - template class map { + template > class map { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef K key_type; typedef T mapped_type; map(); - map(const map &); + map(const map &); unsigned int size() const; bool empty() const; void clear(); %extend { const T& get(const K& key) throw (std::out_of_range) { - std::map::iterator i = self->find(key); + std::map::iterator i = self->find(key); if (i != self->end()) return i->second; else @@ -42,14 +42,14 @@ namespace std { (*self)[key] = x; } void del(const K& key) throw (std::out_of_range) { - std::map::iterator i = self->find(key); + std::map::iterator i = self->find(key); if (i != self->end()) self->erase(i); else throw std::out_of_range("key not found"); } bool has_key(const K& key) { - std::map::iterator i = self->find(key); + std::map::iterator i = self->find(key); return i != self->end(); } }