]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer 46005/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>
Fri, 22 Apr 2022 14:44:10 +0000 (16:44 +0200)
Fixes: https://tracker.ceph.com/issues/55233
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit 2528f9d07017cf7cc77f4c02a993d97074db0596)

src/include/buffer.h

index 0c89367dd3b2c42fc55bee06981a0bb0e0691886..1b208906db0b726bc7001de7cb1f02439f8a8f2f 100644 (file)
@@ -863,7 +863,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);
        }