From: Radosław Zarzyński Date: Sun, 3 Apr 2022 09:53:04 +0000 (+0200) Subject: common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer X-Git-Tag: v18.0.0~1077^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45756%2Fhead;p=ceph.git common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer Fixes: https://tracker.ceph.com/issues/55233 Signed-off-by: Radosław Zarzyński --- diff --git a/src/include/buffer.h b/src/include/buffer.h index 5e3fdf4b40bd4..a00d10a4d26e4 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -865,7 +865,9 @@ struct error_code; if (first_round) { impl_f(first_round); } - if (const auto second_round = len - first_round; second_round) { + // no C++17 for the sake of the C++11 guarantees of librados, sorry. + const auto second_round = len - first_round; + if (second_round) { _refill(second_round); impl_f(second_round); }