Fix %feature not working for conversion operators
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a4906b8182
commit
30d73c82cd
4 changed files with 27 additions and 2 deletions
|
|
@ -162,3 +162,20 @@ namespace Space {
|
|||
}
|
||||
%}
|
||||
|
||||
// Test 8 conversion operators
|
||||
%rename(opbool) operator bool;
|
||||
%rename(opuint) operator unsigned int;
|
||||
|
||||
%exception ConversionOperators::ConversionOperators() "$action /* ConversionOperators::ConversionOperators() */";
|
||||
%exception ConversionOperators::~ConversionOperators() "$action /* ConversionOperators::~ConversionOperators() */";
|
||||
%exception ConversionOperators::operator bool "$action /* ConversionOperators::operator bool */";
|
||||
%exception ConversionOperators::operator unsigned int "$action /* ConversionOperators::unsigned int*/";
|
||||
|
||||
%inline %{
|
||||
class ConversionOperators {
|
||||
public:
|
||||
operator bool() { return false; }
|
||||
operator unsigned int() { return 0; }
|
||||
};
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue