diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2023-02-17 18:44:56 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2023-02-17 18:44:56 +0000 |
commit | 63bf998b30cfac572dd368dc9d66bfb00b86fc52 (patch) | |
tree | a6c03018386744ceb0624cdf48de69bf16cdfc20 | |
parent | 817c700ced95b2fc615e1619c89fcec21f66af55 (diff) | |
download | swig-63bf998b30cfac572dd368dc9d66bfb00b86fc52.tar.gz |
Make new testcase c++98 compliant
-rw-r--r-- | Examples/test-suite/template_partial_specialization_more.i | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Examples/test-suite/template_partial_specialization_more.i b/Examples/test-suite/template_partial_specialization_more.i index 620a5625b..a9e0a591b 100644 --- a/Examples/test-suite/template_partial_specialization_more.i +++ b/Examples/test-suite/template_partial_specialization_more.i @@ -37,7 +37,7 @@ public: %template(VectInt) Vect<int>; %template(FooVectIntDouble) Foo<Vect<int>, double>; // was failing %template(FooShortPtrDouble) Foo<short*, double>; -%template(FooVectVectInt) Foo<Vect<Vect<int>>, int>; // was failing +%template(FooVectVectInt) Foo<Vect<Vect<int> >, int>; // was failing // (2) Same types in both args @@ -74,9 +74,9 @@ template<typename S1, typename S2> struct Partialler<S2, S1*> { void special(S1* // (5) Default args used in specialization, like std::list %inline %{ template <typename A> struct Allocator {}; -template <typename T, class Alloc = Allocator<T>> struct Lyst { void primary(T, Allocator<T>) {} }; +template <typename T, class Alloc = Allocator<T> > struct Lyst { void primary(T, Allocator<T>) {} }; template <typename TT, class XXAlloc> struct Lyst<TT*, XXAlloc> { void specialized1(TT, XXAlloc) {} }; -template <typename TTT, class YY> struct Lyst<TTT**, Allocator<YY>> { void specialized2(TTT, YY) {} }; +template <typename TTT, class YY> struct Lyst<TTT**, Allocator<YY> > { void specialized2(TTT, YY) {} }; // TODO Error: Inconsistent argument count in template partial specialization. 1 2 //template <typename TTTT> struct Lyst<const TTTT&> { void specialized3(TTTT) {} }; void test_list() { @@ -90,7 +90,7 @@ void test_list() { double mydouble = 0; Lyst<double **> lissd; - lissd.specialized2(mydouble, (double **)nullptr); + lissd.specialized2(mydouble, (double **)0); // Lyst<const int&> lissconstint; // lissconstint.specialized3(myint); @@ -98,6 +98,6 @@ void test_list() { %} %template(LystDouble) Lyst<double>; -//%template(LystDouble) Lyst<short, Allocator<short>>; +//%template(LystDouble) Lyst<short, Allocator<short> >; %template(LystPlainStructPtr) Lyst<PlainStruct *>; %template(LystDoublePtrPtr) Lyst<double **>; // called specialized1 instead of specialized2 |