we better disable the comparison method generation by default.
reasons: - before they were not generated, so, nobody will miss them, and still they can be activated back using SWIG_STD_EXTEND_COMPARISON, - the performance penalty is quite visible, and the solution is not general, ie, for user types, still they need to be generated by hand. Marcelo git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
87df1f880e
commit
ab44291de8
9 changed files with 13 additions and 12 deletions
|
|
@ -14,10 +14,11 @@
|
|||
//#define SWIG_STD_DEFAULT_INSTANTIATION
|
||||
|
||||
//
|
||||
// Use the following macro to disable the generation of the comparison
|
||||
// methods, ie, ==, !=, <=, >=, <,>, whenever is needed.
|
||||
// Use the following macro to enable the generation of the
|
||||
// comparison methods, ie, ==, !=, <=, >=, <,>, whenever is needed,
|
||||
// for the primitive types (int,double, etc.)
|
||||
//
|
||||
//#define SWIG_STD_NOEXTEND_COMPARISON
|
||||
//#define SWIG_STD_EXTEND_COMPARISON
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -459,7 +460,7 @@ namespace swigpy {
|
|||
%std_order_methods(__VA_ARGS__ )
|
||||
%enddef
|
||||
|
||||
#if !defined(SWIG_STD_NOEXTEND_COMPARISON)
|
||||
#if defined(SWIG_STD_EXTEND_COMPARISON)
|
||||
%define %std_extcomp(Class,T)
|
||||
%evalif(SWIG_EqualType(T), %std_equal_methods(std::Class<T >))
|
||||
%evalif(SWIG_OrderType(T), %std_order_methods(std::Class<T >))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue