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.
This commit is contained in:
Olly Betts 2022-03-06 14:21:12 +13:00
commit 6d29260a1a

View file

@ -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) { }
%}