use %std_container_methods_without_reverse_iterators
This commit is contained in:
parent
9cb90982ee
commit
88a76de9fe
3 changed files with 7 additions and 9 deletions
|
|
@ -26,17 +26,19 @@
|
|||
class const_iterator;
|
||||
iterator begin();
|
||||
iterator end();
|
||||
#endif
|
||||
|
||||
#if !defined(SWIG_NO_REVERSE_ITERATOR_METHODS)
|
||||
%enddef
|
||||
|
||||
%define %std_container_methods_reverse_iterators(container...)
|
||||
|
||||
#ifdef SWIG_EXPORT_ITERATOR_METHODS
|
||||
class reverse_iterator;
|
||||
class const_reverse_iterator;
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rend();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
%enddef
|
||||
|
||||
// Common container methods
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@
|
|||
// operator--() and constructor(compare function) not available for unordered_
|
||||
// types
|
||||
//
|
||||
#define SWIG_NO_REVERSE_ITERATOR_METHODS
|
||||
%include <std_pair.i>
|
||||
%include <std_container.i>
|
||||
|
||||
%define %std_unordered_map_methods_common(unordered_map...)
|
||||
%std_container_methods(unordered_map);
|
||||
%std_container_methods_without_reverse_iterators(unordered_map);
|
||||
|
||||
size_type erase(const key_type& x);
|
||||
size_type count(const key_type& x) const;
|
||||
|
|
@ -123,4 +122,3 @@ namespace std {
|
|||
};
|
||||
|
||||
}
|
||||
#undef SWIG_NO_REVERSE_ITERATOR_METHODS
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
//
|
||||
|
||||
%include <std_unordered_map.i>
|
||||
#define SWIG_NO_REVERSE_ITERATOR_METHODS
|
||||
|
||||
%define %std_unordered_multimap_methods(mmap...)
|
||||
%std_unordered_map_methods_common(mmap);
|
||||
|
|
@ -86,4 +85,3 @@ namespace std {
|
|||
%std_unordered_multimap_methods(unordered_multimap);
|
||||
};
|
||||
}
|
||||
#undef SWIG_NO_REVERSE_ITERATOR_METHODS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue