Merge pull request #49479 from tchaikov/wip-rgw-fmt-v8

rgw: be compatible with fmtlib v8

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2022-12-16 09:19:12 -05:00 committed by GitHub
commit 7471527448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,8 +337,13 @@ struct RGWDataSyncEnv {
};
// pretty ostream output for `radosgw-admin bucket sync run`
#if FMT_VERSION >= 90000
template<typename ...T>
void pretty_print(const RGWDataSyncEnv* env, fmt::format_string<T...> fmt, T&& ...t) {
#else
template<typename S, typename ...T>
void pretty_print(const RGWDataSyncEnv* env, const S& fmt, T&& ...t) {
#endif
if (unlikely(!!env->ostr)) {
fmt::print(*env->ostr, fmt, std::forward<T>(t)...);
env->ostr->flush();