SWIG 3.0.0 can no longer parse operator>> in C++ code:
test.h:
std::istream &operator<<(std::istream &in, int i) {}
std::istream &operator>>(std::istream &in, int i) {}
test.i:
%module "test"
%include "test.h"
Run with "swig -c++ test.i"
On OS X Mavericks, with the Homebrew build of SWIG 3.0.0, this gives:
test.h:2: Error: Syntax error in input(1).
With SWIG 2.0.12 I instead get the expected:
test.h:1: Warning 503: Can't wrap 'operator <<' unless renamed to a valid identifier.
test.h:2: Warning 503: Can't wrap 'operator >>' unless renamed to a valid identifier.
This was tested for the 3.0.0 release, but the combined lines has triggered a corner case bug. This is now fixed for 3.0.1.
There is a workaround you may want to use until it is released, just swap the lines around: