Fix STL wrappers to not generate <: digraphs.

For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
This commit is contained in:
William S Fulton 2015-12-12 14:05:05 +00:00
commit 6b4e57245d
33 changed files with 339 additions and 303 deletions

View file

@ -108,3 +108,25 @@ const std::vector<const Struct *> & vecstructconstptr(const std::vector<const St
std::vector< swig::LANGUAGE_OBJ > LanguageVector;
}
#endif
// Test that the digraph <::aa::Holder> is not generated
%include <std_vector.i>
%inline %{
namespace aa {
struct Holder {
Holder(int n = 0) : number(n) {}
int number;
};
}
%}
#if !defined(SWIGOCTAVE)
// To fix: something different in Octave is preventing this from working
%template(VectorTest) std::vector< ::aa::Holder >;
%inline %{
std::vector< ::aa::Holder > vec1(std::vector< ::aa::Holder > x) { return x; }
%}
#endif