From ccd313ac648ded8722960580cf86b8c63aab8fd8 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 26 Jan 2022 13:25:36 +1300 Subject: [PATCH] Move new testcase which needs C++11 I don't see how to easily write this without constexpr. --- Examples/test-suite/constant_expr.i | 7 ------- Examples/test-suite/cpp11_constexpr.i | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Examples/test-suite/constant_expr.i b/Examples/test-suite/constant_expr.i index 2dc730acf..7cb529f8a 100644 --- a/Examples/test-suite/constant_expr.i +++ b/Examples/test-suite/constant_expr.i @@ -14,11 +14,4 @@ isPointer = false }; }; -// Test handling of ID PERIOD ID in constant expressions (supported since 4.1.0). -struct A { - int i; -}; -constexpr A a{42}; -const int N = a.i; - %} diff --git a/Examples/test-suite/cpp11_constexpr.i b/Examples/test-suite/cpp11_constexpr.i index 420db4f83..5ba9ff243 100644 --- a/Examples/test-suite/cpp11_constexpr.i +++ b/Examples/test-suite/cpp11_constexpr.i @@ -53,3 +53,12 @@ int Array300[ConstExpressions::LLL]; //int Array400[ConstExpressions::MMM()]; //int Array500[ConstExpressions::NNN()]; %} + +%{ +// Test handling of ID PERIOD ID in constant expressions (supported since 4.1.0). +struct A { + int i; +}; +constexpr A a{42}; +constexpr int N = a.i; +%}