Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now corrected to std::vector< ::X::Y >.
This commit is contained in:
parent
625a405b8e
commit
6b4e57245d
33 changed files with 339 additions and 303 deletions
|
|
@ -68,15 +68,15 @@
|
|||
|
||||
namespace std {
|
||||
|
||||
template<class _Key, class _Tp, class _Compare = std::less<_Key >,
|
||||
class _Alloc = allocator<std::pair<const _Key, _Tp > > >
|
||||
template<class _Key, class _Tp, class _Compare = std::less< _Key >,
|
||||
class _Alloc = allocator<std::pair< const _Key, _Tp > > >
|
||||
class unordered_map {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef _Key key_type;
|
||||
typedef _Tp mapped_type;
|
||||
typedef std::pair<const _Key, _Tp> value_type;
|
||||
typedef std::pair< const _Key, _Tp > value_type;
|
||||
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
|
|
@ -101,11 +101,11 @@ namespace std {
|
|||
}
|
||||
}
|
||||
|
||||
%fragment(SWIG_Traits_frag(std::unordered_map<_Key, _Tp, _Compare, _Alloc >), "header",
|
||||
fragment=SWIG_Traits_frag(std::pair<_Key, _Tp >),
|
||||
%fragment(SWIG_Traits_frag(std::unordered_map< _Key, _Tp, _Compare, _Alloc >), "header",
|
||||
fragment=SWIG_Traits_frag(std::pair< _Key, _Tp >),
|
||||
fragment="StdMapTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits<std::unordered_map<_Key, _Tp, _Compare, _Alloc > > {
|
||||
template <> struct traits<std::unordered_map< _Key, _Tp, _Compare, _Alloc > > {
|
||||
typedef pointer_category category;
|
||||
static const char* type_name() {
|
||||
return "std::unordered_map<" #_Key "," #_Tp "," #_Compare "," #_Alloc " >";
|
||||
|
|
@ -114,13 +114,13 @@ namespace std {
|
|||
}
|
||||
}
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::unordered_map<_Key, _Tp, _Compare, _Alloc >);
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_MAP, std::unordered_map< _Key, _Tp, _Compare, _Alloc >);
|
||||
|
||||
unordered_map( const _Compare& );
|
||||
|
||||
#ifdef %swig_unordered_map_methods
|
||||
// Add swig/language extra methods
|
||||
%swig_unordered_map_methods(std::unordered_map<_Key, _Tp, _Compare, _Alloc >);
|
||||
%swig_unordered_map_methods(std::unordered_map< _Key, _Tp, _Compare, _Alloc >);
|
||||
#endif
|
||||
|
||||
%std_unordered_map_methods(unordered_map);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue