/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. %include "template_typedef_cplx2.h"
  6. %inline %{
  7. typedef vfncs::ArithUnaryFunction<double, double> RFunction;
  8. // **** these two work ****
  9. // typedef vfncs::ArithUnaryFunction<Complex, Complex > CFunction;
  10. // typedef vfncs::ArithUnaryFunction<std::complex<double>, std::complex<double> > CFunction;
  11. // **** these ones don't ***
  12. // typedef vfncs::ArithUnaryFunction<Complex, std::complex<double> > CFunction;
  13. typedef vfncs::ArithUnaryFunction<std::complex<double>, Complex > CFunction;
  14. int my_func_r(RFunction* hello)
  15. {
  16. return 0;
  17. }
  18. int my_func_c(CFunction* hello)
  19. {
  20. return 1;
  21. }
  22. struct Sin : RFunction
  23. {
  24. };
  25. struct CSin : CFunction
  26. {
  27. };
  28. %}