C# std::list changes to support types that are not assignable
Assignable fixes are based on those used by C# std::vector where the default wrappers work if there is no operator== available in the template type. Enhanced wrappers are obtained via a macro: SWIG_STD_LIST_ENHANCED(SomeNamespace::Klass) %template(ListKlass) std::list<SomeNamespace::Klass>; Remove bool specialization (left over from the original std::vector wrappers). Add in missing typedefs.
This commit is contained in:
parent
e7f9316e60
commit
78051fdd33
4 changed files with 85 additions and 51 deletions
|
|
@ -399,4 +399,4 @@ public class li_std_list_runme {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ struct Struct {
|
|||
double num;
|
||||
Struct() : num(0.0) {}
|
||||
Struct(double d) : num(d) {}
|
||||
bool operator==(const Struct &other) { return (num == other.num); }
|
||||
};
|
||||
|
||||
const std::list<Struct> & CopyContainerStruct(const std::list<Struct> & container) { return container; }
|
||||
|
|
@ -70,4 +69,4 @@ enum Fruit {
|
|||
%template(StructList) std::list<Struct>;
|
||||
%template(StructPtrList) std::list<Struct *>;
|
||||
%template(StructConstPtrList) std::list<const Struct *>;
|
||||
%template(FruitList) std::list<enum Fruit>;
|
||||
%template(FruitList) std::list<enum Fruit>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue