/tags/rel-1-3-26/SWIG/Examples/test-suite/template_retvalue.i
Swig | 32 lines | 25 code | 7 blank | 0 comment | 0 complexity | 6cdc18e30032dccaa270f9828ee216cb MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1%module template_retvalue 2%inline %{ 3 4 enum Hello 5 { 6 Hi, Hola 7 }; 8 9 struct C 10 { 11 C(int) {} 12 }; 13 14 template <Hello> 15 class A 16 { 17 public: 18 A(int) {} 19 }; 20 21 22 template <Hello h> 23 struct B 24 { 25 C get_c() { return C(0); } // this works 26 A<h> get_a() { return A<h>(0); } // this doesn't 27 }; 28 29 %} 30 31%template(A_Hi) A<Hi>; 32%template(B_Hola) B<Hola>;