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

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

#
Swig | 26 lines | 16 code | 10 blank | 0 comment | 0 complexity | af1b0a14da21cfe43b2b53f19c9b52b4 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module template_arg_typename
  2. %inline %{
  3. template <class ArgType, class ResType>
  4. struct UnaryFunction
  5. {
  6. typedef void* vptr_type;
  7. };
  8. template <class ArgType>
  9. struct BoolUnaryFunction : UnaryFunction<ArgType, bool>
  10. {
  11. typedef UnaryFunction<ArgType, bool> base;
  12. BoolUnaryFunction(const typename base::vptr_type* vptrf) {}
  13. };
  14. %}
  15. %template(UnaryFunction_bool_bool) UnaryFunction<bool, bool>;
  16. %template(BoolUnaryFunction_bool) BoolUnaryFunction<bool>;