From 7e80c62c7c8e2aada721e979fc90327a218abd0b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2020 23:16:46 +0100 Subject: util/GenerateArray: use double curly braces for compatibility --- src/util/GenerateArray.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/GenerateArray.hxx b/src/util/GenerateArray.hxx index 049653650..b69658421 100644 --- a/src/util/GenerateArray.hxx +++ b/src/util/GenerateArray.hxx @@ -39,7 +39,10 @@ _GenerateArray(F &&f, std::index_sequence) noexcept { using T = decltype(f(0)); - return std::array{f(I)...}; + /* double curly braces for compatibility with older compilers + which are not 100% C++17 compliant (e.g. Apple xcode + 9.4) */ + return std::array{{f(I)...}}; } /** -- cgit v1.2.3