C++11 support for new versions of erase and insert in the STL containers.
The erase and insert methods in the containers use const_iterator instead of iterator in C++11. There are times when the methods wrapped must match the parameters exactly. Specifically when full type information for template types is missing or SWIG fails to look up the type correctly, for example: %include <std_vector.i> typedef float Real; %template(RealVector) std::vector<Real>; SWIG does not find std::vector<Real>::iterator because %template using typedefs does not always work and so SWIG doesn't know if the type is copyable and so uses SwigValueWrapper<iterator> which does not support conversion to another type (const_iterator). This resulted in compilation errors when using the C++11 version of the containers. Closes #73
This commit is contained in:
parent
cf92954bc0
commit
92128eef44
6 changed files with 56 additions and 16 deletions
|
|
@ -5,6 +5,27 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.0 (in progress)
|
||||
============================
|
||||
|
||||
2013-12-22: wsfulton
|
||||
C++11 support for new versions of erase and insert in the STL containers.
|
||||
|
||||
The erase and insert methods in the containers use const_iterator instead
|
||||
of iterator in C++11. There are times when the methods wrapped must match
|
||||
the parameters exactly. Specifically when full type information for
|
||||
template types is missing or SWIG fails to look up the type correctly,
|
||||
for example:
|
||||
|
||||
%include <std_vector.i>
|
||||
typedef float Real;
|
||||
%template(RealVector) std::vector<Real>;
|
||||
|
||||
SWIG does not find std::vector<Real>::iterator because %template using
|
||||
typedefs does not always work and so SWIG doesn't know if the type is
|
||||
copyable and so uses SwigValueWrapper<iterator> which does
|
||||
not support conversion to another type (const_iterator). This resulted
|
||||
in compilation errors when using the C++11 version of the containers.
|
||||
|
||||
Closes #73
|
||||
|
||||
2013-12-18: ianlancetaylor
|
||||
[Go] Don't require that Go environment variables be set
|
||||
when running examples or testsuite when using Go 1 or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue