PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/template_construct.i

#
Swig | 15 lines | 11 code | 4 blank | 0 comment | 0 complexity | 56242306018da5a63c1ddcd9e0e3f04c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module template_construct
  2. // Tests templates to make sure an extra <> in a constructor is ok.
  3. %inline %{
  4. template<class T>
  5. class Foo {
  6. T y;
  7. public:
  8. Foo<T>(T x) : y(x) { }
  9. };
  10. %}
  11. %template(Foo_int) Foo<int>;