Content-Type: multipart/alternative; boundary="----=_NextPart_001_00F8_01CA8A0D.110AF860" ------=_NextPart_001_00F8_01CA8A0D.110AF860 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm running into problems with Swig, namespaces, and template arguments. Test input: namespace std { template class less; template > class set { }; } namespace A { template > class set_container { public: set get_set(); }; } namespace B { class Data; } %template(set_container_Data) A::set_container; A::set_container test1(); A::set_container > test2(); A::set_container<::B::Data, std::less > test3(); Now I run: swigwin-1.3.40/swig -csharp -c++ -module testing testing.i testing.cs contains: public static set_container_Data test1() . public static SWIGTYPE_p_A__set_containerT_B__Data_std__lessT___B__Data_t_t test2() { . public static SWIGTYPE_p_A__set_containerT___B__Data_std__lessT_B__Data_t_t test3() { How do I tell Swig that test2() and test3() should return set_container_Data? set_container_Data.cs contains: public SWIGTYPE_p_setT_B__Data_Pred_t get_set() { How do I tell Swig that get_set() should return set_container_Data? Thanks, Kevin ------=_NextPart_001_00F8_01CA8A0D.110AF860 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m running = into problems with Swig, namespaces, and template = arguments.

 

Test = input:

namespace std = {

  = template<class T> class less;

  = template<class TYPE, Comp=3Dstd::less<TYPE> >

  class set = {  };

}

 

namespace A = {

  template = <class TYPE, Pred=3Dstd::less<TYPE> >

  class = set_container {

   = public:

    set<TYPE, Pred> get_set();

  = };

}

 

namespace B = {

  class = Data;

}

 

%template(set_container_Data) A::set_container<B::Data>;

 

A::set_container<B::Data> test1();

A::set_container<B::Data, std::less<::B::Data> > test2();

A::set_container<::B::Data, std::less<B::Data> > test3();

 

Now I = run:

swigwin-1.3.40/swig -csharp -c++ -module testing testing.i

 

testing.cs = contains:

public static set_container_Data test1()

public static SWIGTYPE_p_A__set_containerT_B__Data_std__lessT___B__Data_t_t test2() = {

public static SWIGTYPE_p_A__set_containerT___B__Data_std__lessT_B__Data_t_t test3() = {

 

How do I tell Swig = that test2() and test3() should return set_container_Data?

 

set_container_Data.cs contains:

  public SWIGTYPE_p_setT_B__Data_Pred_t get_set() {

 

How do I tell Swig = that get_set() should return set_container_Data?

 

Thanks,

Kevin

------=_NextPart_001_00F8_01CA8A0D.110AF860--