Hello,
Using the file attached:
struct A{};
template <class T>
struct B{ typedef A C; };
template <class T>
struct C{
typedef B<T> BT;
typename BT::C get_data(){return data;};
typename BT::C data;
};
with .i
%module t3
%{
#include "t3.h"
%}
%include "t3.h"
%template(Vh_sc) C<int>;
Swig generates
SwigValueWrapper< C< int >::BT::C<(int)> > result;
instead of
SwigValueWrapper< C< int >::BT::C > result;
Everything works as expected if I change the typedef in class B.
Forgot to mention usual info:
SWIG Version 1.3.40
Compiled with g++ (Debian 4.3.4-6) 4.3.4
Best.
The current version in svn generates:
SwigValueWrapper< C< int >::BT::C< int > > result;
which is slightly different, but still the trailing <int> needs to be dropped.
Current git master generates sc different again:
Still doesn't compile though. I think again the trailing
<int>
shouldn't be there.