summaryrefslogtreecommitdiff
path: root/Examples
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-23 07:32:12 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-23 07:32:12 +0000
commite0904f44eb1eed9913bb8c93452d7662ea5b2c6f (patch)
treec646422fffdf57ee350859b3467b0c9a481e4b5a /Examples
parentca5c68e5441fa8334381bd26ea2ff5132c26e6ab (diff)
downloadswig-e0904f44eb1eed9913bb8c93452d7662ea5b2c6f.tar.gz
Restore testing template_expr testcase
Problems handling < and > in template parameters are now fixed. Remove illegal C++ code (template typedefs) - replace with a function using same template.
Diffstat (limited to 'Examples')
-rw-r--r--Examples/test-suite/common.mk2
-rw-r--r--Examples/test-suite/template_expr.i15
2 files changed, 13 insertions, 4 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index d26f2505c..2539a65ba 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -90,7 +90,6 @@ CPP_TEST_BROKEN += \
nested_private \
template_default_pointer \
template_private_assignment \
- template_expr \
$(CPP11_TEST_BROKEN) \
$(CPP14_TEST_BROKEN) \
$(CPP17_TEST_BROKEN) \
@@ -459,6 +458,7 @@ CPP_TEST_CASES += \
template_enum_ns_inherit \
template_enum_typedef \
template_explicit \
+ template_expr \
template_extend1 \
template_extend2 \
template_extend_overload \
diff --git a/Examples/test-suite/template_expr.i b/Examples/test-suite/template_expr.i
index a1bb7ef09..98e66e3c4 100644
--- a/Examples/test-suite/template_expr.i
+++ b/Examples/test-suite/template_expr.i
@@ -2,8 +2,11 @@
// bug #925555
%inline %{
+struct ThisType {};
+template<int _size, int _stride, class __elementTypeSequence, class __dataPtrType>
+ class vctFixedLengthConstSequenceBase {};
- template<int __stride, class __elementTypeSequence,
+ template<int _size, int __stride, class __elementTypeSequence,
class __dataPtrType, class __elementType>
inline const ThisType &
ConcatenationOf(const vctFixedLengthConstSequenceBase<_size - 1,
@@ -30,9 +33,15 @@ class X {};
// bug #646275
%inline %{
+struct Ty {};
+template<typename Type, short a> struct Test {};
+template<int rank, typename X, typename Type> struct CondRetType {
+ typedef Type TestRm1;
+};
+
template<typename Type, short Rank>
- typedef typename CondRetType< Rank!=1,
- Test<Type,Rank-1>, Type>::TestRm1 TestRm1;
+ void Func(typename CondRetType< Rank!=1,
+ Test<Type,Rank-1>, Type>::TestRm1) {}
%}