]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: pass fmt::format_string to pretty_print()
authorKefu Chai <tchaikov@gmail.com>
Fri, 2 Dec 2022 09:25:24 +0000 (17:25 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 10 Dec 2022 01:58:04 +0000 (09:58 +0800)
commit525616e658b84c33ce680855eac9eb8e44628426
tree19f758f365aabcfebe768c0df270bcefd7453a3d
parentc7e3e95277c69f94574928115f4cb7bf3608a79f
rgw: pass fmt::format_string to pretty_print()

otherwise we'd have following compiling failure:

In file included from /var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.cc:13:
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.h:345:28: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char> &, rgw_obj_key &, unsigned long &, std::basic_string<char> &>::basic_format_string<char[59], 0>' is not a constant expressio
n
    fmt::print(*env->ostr, std::forward<T>(t)...);
                           ^
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.cc:4136:8: note: in instantiation of function template specialization 'pretty_print<const char (&)[59], std::basic_string<char> &, rgw_obj_key &, unsigned long &, std::basic_string<char> &>' requested here
              pretty_print(sc->env, "Syncing object s3://{}/{} version {} in sync from zone {}\n",
              ^
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.cc:4070:3: note: in instantiation of member function 'RGWBucketSyncSingleEntryCR<rgw_obj_key, rgw_obj_key>::operate' requested here
  RGWBucketSyncSingleEntryCR(RGWDataSyncCtx *_sc,
  ^
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.cc:4352:27: note: in instantiation of member function 'RGWBucketSyncSingleEntryCR<rgw_obj_key, rgw_obj_key>::RGWBucketSyncSingleEntryCR' requested here
          yield spawn(new SyncCR(sc, sync_pipe, entry->key,
                          ^
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.h:345:44: note: function parameter 't' with unknown value cannot be used in a constant expression
    fmt::print(*env->ostr, std::forward<T>(t)...);
                                           ^
/var/ssd/ceph/src/rgw/store/rados/rgw_data_sync.h:343:53: note: declared here
void pretty_print(const RGWDataSyncEnv* env, T&& ...t) {
                                                    ^

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/rgw/driver/rados/rgw_data_sync.h