PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 57 lines | 35 code | 22 blank | 0 comment | 0 complexity | 5ae283c11384cacc334c17c492712891 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module template_expr
  2. // bug #925555
  3. %inline %{
  4. template<int __stride, class __elementTypeSequence,
  5. class __dataPtrType, class __elementType>
  6. inline const ThisType &
  7. ConcatenationOf(const vctFixedLengthConstSequenceBase<_size - 1,
  8. __stride, __elementTypeSequence, __dataPtrType> & other,
  9. __elementType last);
  10. %}
  11. // bug #956282
  12. %inline %{
  13. template<int q>
  14. class X {};
  15. %}
  16. %template(X_1) X<1>;
  17. %template(X_m1) X<-1>;
  18. %template(X_1plus2) X<1+2>;
  19. %template(X_1024div8) X<1024/8>;
  20. // bug #646275
  21. %inline %{
  22. template<typename Type, short Rank>
  23. typedef typename CondRetType< Rank!=1,
  24. Test<Type,Rank-1>, Type>::TestRm1 TestRm1;
  25. %}
  26. // bug #994301
  27. %inline %{
  28. template<int foo> class X994301 {};
  29. %}
  30. %template(X994301_ternary) X<(7 >= 4) ? 1 + 1 : 1>;
  31. %template(X994301_ternary2) X<(7 <= 4) ? 1 + 1 : 1>;
  32. // bug #1338527 (still broken)
  33. %inline %{
  34. template<typename, typename> class PatchList;
  35. %}