/trunk/Examples/test-suite/template_typedef_cplx4.i
Swig | 44 lines | 28 code | 16 blank | 0 comment | 0 complexity | 57f230025b39b08ea32ee80fa6e5444a MD5 | raw file
1%module template_typedef_cplx4 2%{ 3#include "template_typedef_cplx2.h" 4%} 5 6%include "template_typedef_cplx2.h" 7 8%inline %{ 9 10 typedef vfncs::ArithUnaryFunction<double, double> RFunction; 11 // **** these two work **** 12 // typedef vfncs::ArithUnaryFunction<Complex, Complex > CFunction; 13 // typedef vfncs::ArithUnaryFunction<std::complex<double>, std::complex<double> > CFunction; 14 15 // **** these ones don't *** 16 // typedef vfncs::ArithUnaryFunction<Complex, std::complex<double> > CFunction; 17 typedef vfncs::ArithUnaryFunction<std::complex<double>, Complex > CFunction; 18 19 20 21 int my_func_r(RFunction* hello) 22 { 23 return 0; 24 } 25 26 int my_func_c(CFunction* hello) 27 { 28 return 1; 29 } 30 31 struct Sin : RFunction 32 { 33 }; 34 35 struct CSin : CFunction 36 { 37 }; 38 39%} 40 41 42 43 44