]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer 45756/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Sun, 3 Apr 2022 09:53:04 +0000 (11:53 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 7 Apr 2022 22:59:05 +0000 (00:59 +0200)
Fixes: https://tracker.ceph.com/issues/55233
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/include/buffer.h

index 5e3fdf4b40bd43b8a19dd20e54503aac32babca1..a00d10a4d26e42293501f5827c5ca565222cf330 100644 (file)
@@ -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);
        }