/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

  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>;