From 5887a4b0c2bb725bb58cdc5018a1c7ff90b083d8 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 8 Jul 2020 08:41:00 +0200 Subject: [PATCH] genoffsets: Remove constexpr on PORT_OFFSETS array Not sure why CLang doesn't allow this to be constexpr while GCC does, let's figure out later why this is the case. Error message: src/dynports.cc:13:45: error: constexpr variable cannot have non-literal type 'const std::array' (aka 'const array') static constexpr std::array PORT_OFFSETS {{ ^ Signed-off-by: aszlig --- scripts/genoffsets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/genoffsets.py b/scripts/genoffsets.py index dbc279e..fa352a3 100644 --- a/scripts/genoffsets.py +++ b/scripts/genoffsets.py @@ -28,7 +28,7 @@ formatted = [', '.join(['{:>5}'.format(o) for o in chunk]) for chunk in chunks] - sig = 'static constexpr std::array PORT_OFFSETS' + sig = 'static std::array PORT_OFFSETS' header = sig.format(len(offsets)) + ' {{\n ' out = header + ',\n '.join(formatted) + '\n}};\n'