From: Casey Bodley Date: Thu, 16 Nov 2023 16:01:54 +0000 (-0500) Subject: osd/scrubber: fix ambiguous call to format_to() X-Git-Tag: v19.0.0~82^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa6ea9de7cc50e9963723ff85bd924461235ca2b;p=ceph.git osd/scrubber: fix ambiguous call to format_to() new call to format_to() is ambiguous between std and fmt namespaces: ceph/src/osd/scrubber/pg_scrubber.cc:654:26: required from here ceph/src/osd/scrubber/scrub_job.h:241:21: error: call of overloaded ‘format_to(fmt::v9::basic_format_context::iterator, const char [60], const double&, double, const double&, const double&, const double&, const double&, const bool&)’ is ambiguous ... ceph/src/fmt/include/fmt/core.h:3233:17: note: candidate: ‘OutputIt fmt::v9::format_to(OutputIt, format_string, T&& ...) [with OutputIt = appender; T = {const double&, double, const double&, const double&, const double&, const double&, const bool&}; typename std::enable_if::value, int>::type = 0; format_string = basic_format_string]’ 3233 | FMT_INLINE auto format_to(OutputIt out, format_string fmt, T&&... args) | ^~~~~~~~~ ... /usr/include/c++/13/format:3824:5: note: candidate: ‘_Out std::format_to(_Out, format_string<_Args ...>, _Args&& ...) [with _Out = fmt::v9::appender; _Args = {const double&, double, const double&, const double&, const double&, const double&, const bool&}; format_string<_Args ...> = basic_format_string]’ 3824 | format_to(_Out __out, format_string<_Args...> __fmt, _Args&&... __args) | ^~~~~~~~~ gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) Signed-off-by: Casey Bodley --- diff --git a/src/osd/scrubber/scrub_job.h b/src/osd/scrubber/scrub_job.h index 57ff1400f9cb..ae29c8ebab44 100644 --- a/src/osd/scrubber/scrub_job.h +++ b/src/osd/scrubber/scrub_job.h @@ -238,7 +238,7 @@ struct formatter { template auto format(const Scrub::sched_conf_t& cf, FormatContext& ctx) { - return format_to( + return fmt::format_to( ctx.out(), "periods: s:{}/{} d:{}/{} iv-ratio:{} deep-rand:{} on-inv:{}", cf.shallow_interval, cf.max_shallow.value_or(-1.0), cf.deep_interval,