I'm trying to get SWIG to %ignore a symbol like MyNamespace::SubNamespace::MyClass::operator->(). I've tried a million different combinations of %ignore:
%ignore operator->;%ignore operator ->;%ignore operator ->();%ignore *::operator->;%ignore MyNamespace::SubNamespace::MyClass::operator->;
Hell even %ignore MyNamespace::SubNamespace::MyClass; doesn't seem to do anything. In every case I get this error:
...MyFile.hpp:267: Warning 508: Declaration of 'operator <' shadows declaration accessible via operator->(),
...MyFile.hpp:192: Warning 508: previous declaration of 'operator <'.
It's caused by this SWIG code, which seems to be something to do with smart pointers. However it looks from the code like %ignoreing the operator->() should remove the warning. In any case ignoring the entire class should.
So my question is, is there any way to debug %ignore. As far as I can see it looks like you have to just keep trying combinations until it works. Is there a way to print out SWIG's list of symbols? The code doesn't look like it has any logging facility.
Well I didn't find an option for
%ignorespecifically, but there are various-debug-...command line options. In particular-debug-symbolslead me to find thatoperator->()is%renamed to__deref__inswig.swgwhich is included by default in all files.I tried
%ignore __deref__;and some variants but that doensn't work.I even eventually modified the code to detect
%ignores (hint:) but none of those names seem to have namespaces. In fact, the warning about two
operator<'s are in different classes (although one is a friend of the other) and as far as I can tell SWIG is just looking up if there are any otheroperator<'s. Could be a namespace bug.