Fix compilation with gcc5, stdc++14

Fixes:
shrpx_api_downstream_connection.cc:57:3: error: array must be initialized with a brace-enclosed initializer
This commit is contained in:
Michka Popoff 2018-12-02 20:06:32 +01:00
parent 302abf1b46
commit 829258e703
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,7 @@ namespace {
// List of API endpoints // List of API endpoints
const std::array<APIEndpoint, 2> &apis() { const std::array<APIEndpoint, 2> &apis() {
static const auto apis = new std::array<APIEndpoint, 2>{ static const auto apis = new std::array<APIEndpoint, 2>{
{
APIEndpoint{ APIEndpoint{
StringRef::from_lit("/api/v1beta1/backendconfig"), StringRef::from_lit("/api/v1beta1/backendconfig"),
true, true,
@ -54,6 +55,7 @@ const std::array<APIEndpoint, 2> &apis() {
(1 << API_METHOD_GET), (1 << API_METHOD_GET),
&APIDownstreamConnection::handle_configrevision, &APIDownstreamConnection::handle_configrevision,
}, },
}
}; };
return *apis; return *apis;