-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
This is a continuation of micro-manager/micro-manager#838.
Quoting from the Swig Changelog, in 4.0.0 there is the following entry:
2019-02-28: wsfulton
[Java] std::vector improvements for types that do not have a default constructor.
The std::vector wrappers have been changed to work by default for elements that are
not default insertable, i.e. have no default constructor. This has been achieved by
not wrapping:
vector(size_type n);
Previously the above had to be ignored via %ignore.
If the above constructor is still required it can be added back in again via %extend:
%extend std::vector {
vector(size_type count) { return new std::vector< T >(count); }
}
Alternatively, the following wrapped constructor could be used as it provides near-enough
equivalent functionality:
vector(jint count, const value_type& value);
*** POTENTIAL INCOMPATIBILITY ***
This suggests that it might be possible to have code that works across Swig versions.
JiangXL
Metadata
Metadata
Assignees
Labels
No labels