PageRenderTime 58ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 21 lines | 16 code | 5 blank | 0 comment | 0 complexity | 5cef1873107a5c712f7483eaa537c048 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module template_partial_arg
  2. %inline %{
  3. template <class T> class Foo {
  4. public:
  5. T bar() { return T(); }
  6. T* baz() { return 0; }
  7. };
  8. template <class T> class Foo<T*> {
  9. public:
  10. T bar() { return T(); }
  11. T* baz() { return 0; }
  12. };
  13. class Bar {};
  14. %}
  15. %template(Foo1) Foo<Bar>;
  16. %template(Foo2) Foo<Bar*>;