From 143f697310445ca3acc9b14ea10aa3bde165ad4e Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 27 Feb 2019 13:53:24 +0100 Subject: [PATCH] GCC 4.8 brace initializer requires double braces ================================================ GCC 7 and clang work fine without the extra set of braces. std::array is an aggregate that contains a C array. To initialize it, you need outer braces for the class itself and inner braces for the C array: https://stackoverflow.com/questions/12844475/why-cant-simple-initialize-with-braces-2d-stdarray --- src/Mod/Sketcher/App/ExternalGeometryExtension.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/ExternalGeometryExtension.h b/src/Mod/Sketcher/App/ExternalGeometryExtension.h index 503c844951..4f3c1e6f68 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryExtension.h +++ b/src/Mod/Sketcher/App/ExternalGeometryExtension.h @@ -43,7 +43,7 @@ public: }; // END_CREDIT_BLOCK: Credit under LGPL for this block to Zheng, Lei (realthunder) - constexpr static std::array flag2str { "Defining", "Frozen", "Detached","Missing", "Sync" }; + constexpr static std::array flag2str {{ "Defining", "Frozen", "Detached","Missing", "Sync" }}; ExternalGeometryExtension() = default; virtual ~ExternalGeometryExtension() = default;