summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-01-14 23:16:46 +0100
committerMax Kellermann <max@musicpd.org>2020-01-14 23:16:46 +0100
commit7e80c62c7c8e2aada721e979fc90327a218abd0b (patch)
tree4d929c79fb31661f16a7454b91bfbbfff224e41c
parent4038d8527f68a04c213303e0a680600afc119cdb (diff)
util/GenerateArray: use double curly braces for compatibility
-rw-r--r--src/util/GenerateArray.hxx5
1 files changed, 4 insertions, 1 deletions
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<I...>) noexcept
{
using T = decltype(f(0));
- return std::array<T, N>{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<T, N>{{f(I)...}};
}
/**