PageRenderTime 41ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/template_typedef_cplx5.i

#
Swig | 22 lines | 14 code | 8 blank | 0 comment | 0 complexity | 8dbafb661cd810145dfd406fd8ccc543 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module template_typedef_cplx5
  2. %{
  3. #include <complex>
  4. %}
  5. %inline %{
  6. // This typedef triggers an inifinite recursion
  7. // in the next test1() nd test2() function declarations
  8. typedef std::complex<double> complex;
  9. struct A
  10. {
  11. complex test1() { complex r; return r; }
  12. std::complex<double> test2() { std::complex<double> r; return r; }
  13. };
  14. %}