Currently when parsing a class that has operators, SWIG complains the following:
1>c:\...\file.h(nnn): Warning(503): Can't wrap 'operator xx' unless renamed to a valid identifier.
I think it would be fairly easy to add operator support for C# to SWIG.
Right now, I'm doing this for every operator (pseudo-code, replace xx and params to appropriate):
%rename(%mangle(operator xx)) operator xx;
%csmethodmodifiers operator xx "private";
// This returns bool for a comparision operator
public static Class operator xx (Class v1, params)
This obviously could be made totally automatic.
Log in to post a comment.