lundi 17 décembre 2018

why this error happend? c++ library build

i don't know why this error occurs.

i doing install nghttp2 on centos 7.

my centos is support for c++17

i forgot any options?

help me please.

thank you for read :)


    usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #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 \
      ^
    In file included from util.h:52:0,
                     from util.cc:25:
    template.h:44:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
     template <typename... T>
                       ^
    template.h:45:1: error: constexpr’ does not name a type
     constexpr std::array<
     ^
    template.h:45:1: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
    template.h:54:33: error: constexpr’ does not name a type
     template <typename T, size_t N> constexpr size_t array_size(T (&)[N]) {
                                     ^
    template.h:54:33: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
    template.h:58:33: error: constexpr’ does not name a type
     template <typename T, size_t N> constexpr size_t str_size(T (&)[N]) {
                                     ^
    template.h:58:33: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
    template.h:64:31: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
     template <typename F, typename... T> struct Defer {
                                   ^
    template.h:65:11: error: expected ‘,’ or ‘...’ before ‘&&’ token
       Defer(F &&f, T &&... t)
               ^
    template.h:67:15: error: expected ‘,’ or ‘...’ before ‘&&’ token
       Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
                   ^
    template.h:67:18: error: invalid constructor; you probably meant ‘nghttp2::Defer<F, T> (const nghttp2::Defer<F, T>&)’
       Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
                      ^
    template.h:67:18: error: expected ‘;’ at end of member declaration
    template.h:67:20: error: noexcept’ does not name a type
       Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
                        ^
    template.h:70:9: error: expected nested-name-specifier before ‘ResultType’
       using ResultType = typename std::result_of<typename std::decay<F>::type(
             ^
    template.h:70:9: error: using-declaration for non-member at class scope
    template.h:70:20: error: expected ‘;’ before ‘=’ token
       using ResultType = typename std::result_of<typename std::decay<F>::type(
                        ^
    template.h:70:20: error: expected unqualified-id before ‘=’ token
    template.h:72:3: error: function’ in namespace ‘std’ does not name a type
       std::function<ResultType()> f;
       ^
    template.h: In constructor ‘nghttp2::Defer<F, T>::Defer(F)’:
    template.h:66:9: error: class ‘nghttp2::Defer<F, T>’ does not have any field named ‘f’
           : f(std::bind(std::forward<F>(f), std::forward<T>(t)...)) {}
             ^
    template.h:66:11: error: bind’ is not a member of ‘std’
           : f(std::bind(std::forward<F>(f), std::forward<T>(t)...)) {}
               ^
    template.h:66:11: note: suggested alternative:
    In file included from /usr/include/netinet/in.h:24:0,
                     from /usr/include/netdb.h:27,
                     from util.h:35,
                     from util.cc:25:
    ...

Aucun commentaire:

Enregistrer un commentaire