GCC 4.8 brace initializer requires double braces

================================================

GCC 7 and clang work fine without the extra set of braces.

std::array<T, N> 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
This commit is contained in:
Abdullah Tahiri
2019-02-27 13:53:24 +01:00
committed by wmayer
parent 1a401a6a50
commit 143f697310

View File

@@ -43,7 +43,7 @@ public:
};
// END_CREDIT_BLOCK: Credit under LGPL for this block to Zheng, Lei (realthunder) <realthunder.dev@gmail.com>
constexpr static std::array<const char *,NumFlags> flag2str { "Defining", "Frozen", "Detached","Missing", "Sync" };
constexpr static std::array<const char *,NumFlags> flag2str {{ "Defining", "Frozen", "Detached","Missing", "Sync" }};
ExternalGeometryExtension() = default;
virtual ~ExternalGeometryExtension() = default;