diff options
author | Olly Betts <olly@survex.com> | 2022-03-06 14:21:12 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-03-06 14:21:12 +1300 |
commit | 6d29260a1a41deb4f9db38401e9f37000573d9ad (patch) | |
tree | b82cd8f517c2996445032c8e83fae673263f897e | |
parent | 735732d721ea18a34013cea43b1a8951408f9fc9 (diff) | |
download | swig-6d29260a1a41deb4f9db38401e9f37000573d9ad.tar.gz |
Eliminate C++11 from constant_expr test
This was introduced by a recent commit adding a testcase matching
an example in the manual. There doesn't seem to be a suitable
termplate in the standard library before C++11, so instead use
a dummy version of std::array defined in the testcase.
-rw-r--r-- | Examples/test-suite/constant_expr.i | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Examples/test-suite/constant_expr.i b/Examples/test-suite/constant_expr.i index 43612b90b..a5ba5c6dd 100644 --- a/Examples/test-suite/constant_expr.i +++ b/Examples/test-suite/constant_expr.i @@ -23,8 +23,15 @@ isPointer = false int a; int test2(int b = 9%a) { return b; } -/* Example from manual. */ -#include <array> -void bar(std::array<int, (1<2? 100 : 50)> *x) { } +/* Example from manual, adapted to avoid C++11 requirement. */ +namespace fakestd { + template<typename T, unsigned N> + class array { + T a[N]; + public: + array() {} + }; +} +void bar(fakestd::array<int, (1<2? 100 : 50)> *x) { } %} |