Я не знаю, почему возникает эта ошибка.
Я использую nghttp2 для centos 7.
Мой centos поддерживает c ++ 17
Я забылЛюбые варианты?
Помогите мне, пожалуйста.
Спасибо.
<b>usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2:</b> <b>error: </b>#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
<b> ^</b>
In file included from <b>util.h:52:0</b>,
from <b>util.cc:25</b>:
<b>template.h:44:19:</b> <b>warning: </b>variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
template <typename... T>
<b> ^</b>
<b>template.h:45:1:</b> <b>error: </b>‘<b>constexpr</b>’ does not name a type
constexpr std::array<
<b> ^</b>
<b>template.h:45:1:</b> <b>note: </b>C++11 ‘<b>constexpr</b>’ only available with -std=c++11 or -std=gnu++11
<b>template.h:54:33:</b> <b>error: </b>‘<b>constexpr</b>’ does not name a type
template <typename T, size_t N> constexpr size_t array_size(T (&)[N]) {
<b> ^</b>
<b>template.h:54:33:</b> <b>note: </b>C++11 ‘<b>constexpr</b>’ only available with -std=c++11 or -std=gnu++11
<b>template.h:58:33:</b> <b>error: </b>‘<b>constexpr</b>’ does not name a type
template <typename T, size_t N> constexpr size_t str_size(T (&)[N]) {
<b> ^</b>
<b>template.h:58:33:</b> <b>note: </b>C++11 ‘<b>constexpr</b>’ only available with -std=c++11 or -std=gnu++11
<b>template.h:64:31:</b> <b>warning: </b>variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
template <typename F, typename... T> struct Defer {
<b> ^</b>
<b>template.h:65:11:</b> <b>error: </b>expected ‘<b>,</b>’ or ‘<b>...</b>’ before ‘<b>&&</b>’ token
Defer(F &&f, T &&... t)
<b> ^</b>
<b>template.h:67:15:</b> <b>error: </b>expected ‘<b>,</b>’ or ‘<b>...</b>’ before ‘<b>&&</b>’ token
Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
<b> ^</b>
<b>template.h:67:18:</b> <b>error: </b>invalid constructor; you probably meant ‘<b>nghttp2::Defer<F, T> (const nghttp2::Defer<F, T>&)</b>’
Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
<b> ^</b>
<b>template.h:67:18:</b> <b>error: </b>expected ‘<b>;</b>’ at end of member declaration
<b>template.h:67:20:</b> <b>error: </b>‘<b>noexcept</b>’ does not name a type
Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
<b> ^</b>
<b>template.h:70:9:</b> <b>error: </b>expected nested-name-specifier before ‘<b>ResultType</b>’
using ResultType = typename std::result_of<typename std::decay<F>::type(
<b> ^</b>
<b>template.h:70:9:</b> <b>error: </b>using-declaration for non-member at class scope
<b>template.h:70:20:</b> <b>error: </b>expected ‘<b>;</b>’ before ‘<b>=</b>’ token
using ResultType = typename std::result_of<typename std::decay<F>::type(
<b> ^</b>
<b>template.h:70:20:</b> <b>error: </b>expected unqualified-id before ‘<b>=</b>’ token
<b>template.h:72:3:</b> <b>error: </b>‘<b>function</b>’ in namespace ‘<b>std</b>’ does not name a type
std::function<ResultType()> f;
<b> ^</b>
<b>template.h:</b> In constructor ‘<b>nghttp2::Defer<F, T>::Defer(F)</b>’:
<b>template.h:66:9:</b> <b>error: </b>class ‘<b>nghttp2::Defer<F, T></b>’ does not have any field named ‘<b>f</b>’
: f(std::bind(std::forward<F>(f), std::forward<T>(t)...)) {}
<b> ^</b>
<b>template.h:66:11:</b> <b>error: </b>‘<b>bind</b>’ is not a member of ‘<b>std</b>’
: f(std::bind(std::forward<F>(f), std::forward<T>(t)...)) {}
<b> ^</b>
<b>template.h:66:11:</b> <b>note: </b>suggested alternative:
In file included from <b>/usr/include/netinet/in.h:24:0</b>,
from <b>/usr/include/netdb.h:27</b>,
from <b>util.h:35</b>,
from <b>util.cc:25</b>:
...