From: Radoslaw Zarzynski Date: Tue, 4 Apr 2017 09:42:37 +0000 (+0200) Subject: rgw: switch to std::array in RGWBulkUploadOp due to C++11 and FreeBSD. X-Git-Tag: v12.0.2~190^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f1871bc856dab56b0850afbdd7bbd993d190a93;p=ceph.git rgw: switch to std::array in RGWBulkUploadOp due to C++11 and FreeBSD. Before this patch RGWBulkUploadOp::terminal_errors was declared as std::initializer_list. Unfortunately, a constexpr constructor for it is available since C++14, not C++11. This was causing build failures on FreeBSD. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index a4572dd3a947..4812033aea40 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -5499,7 +5499,7 @@ void RGWBulkDelete::execute() } -constexpr std::initializer_list RGWBulkUploadOp::terminal_errors; +constexpr std::array RGWBulkUploadOp::terminal_errors; int RGWBulkUploadOp::verify_permission() { diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index abb1969eec9b..9aa41eca24ab 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -13,6 +13,7 @@ #include +#include #include #include #include @@ -402,8 +403,8 @@ protected: const std::string path; }; - static constexpr std::initializer_list terminal_errors = { - -EACCES, -EPERM + static constexpr std::array terminal_errors = { + { -EACCES, -EPERM } }; /* FIXME: boost::container::small_vector failures; */