This patch provides the full java.util.List<> interface for Java Vector wrappers. It also adjusts the test suite accordingly, and adds tests that check the improved interface. It applies well to the current trunk version (r12777).
The patch doesn't make any test cases fail. (That is, without the patch all test cases except "java/autodoc.cpptest" succeed. After applying the patch, the test case "java/autodoc.cpptest" is still the only one that fails.)
This patch supersedes the previous patch of https://sourceforge.net/tracker/?func=detail&atid=301645&aid=3325013&group_id=1645
Provide the full java.util.List<> interface for Java Vector wrappers
Is it intended to support shared_ptr? When I apply the patch I get a syntax error when using shared_ptr. The C# implementation seems to handle shared_ptr.
SWIG_STD_VECTOR_ENHANCED(boost::shared_ptr<A>)
%template(APtrList) std::vector<boost::shared_ptr<A> >;
The patch does support shared_ptr<>, but you need a typedef for that.
You'll find more details in my previous comment on that topic: http://sourceforge.net/tracker/?func=detail&atid=301645&aid=3325013&group_id=1645#artifact_comment_5778452
I wish there was a better solution to this in SWIG, but I haven't yet found any. So I'm waiting to get some advice from a SWIG expert.
The autodoc testcase has been fixed in trunk now. Thanks for the patch, I will be looking at this in detail and with much interest as soon as I can.
This patch works great on my side, currently as separate std_vector.i, thanks for the great work. I hope it will get merged. :)
Add via https://github.com/swig/swig/pull/842