From 4a2f1681547235923caa4e275a502c097c33dd3d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 9 Sep 2015 16:56:48 -0400 Subject: [PATCH] common: expose Formatter::flush to derived classes class Formatter declares both a 'virtual void flush(ostream&)' and a 'void flush(bufferlist&)'. however, because its subclasses only override the former, c++'s function overloading rules cause the latter overload to be hidden Signed-off-by: Casey Bodley --- src/common/Formatter.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/Formatter.h b/src/common/Formatter.h index d74fab7a12d53..6aeb05deb4524 100644 --- a/src/common/Formatter.h +++ b/src/common/Formatter.h @@ -97,6 +97,7 @@ namespace ceph { virtual void output_header() {}; virtual void output_footer() {}; void flush(std::ostream& os); + using Formatter::flush; // don't hide Formatter::flush(bufferlist &bl) void reset(); virtual void open_array_section(const char *name); void open_array_section_in_ns(const char *name, const char *ns); @@ -142,6 +143,7 @@ namespace ceph { virtual void output_footer(); void flush(std::ostream& os); + using Formatter::flush; // don't hide Formatter::flush(bufferlist &bl) void reset(); void open_array_section(const char *name); void open_array_section_in_ns(const char *name, const char *ns); @@ -184,6 +186,7 @@ namespace ceph { virtual void output_header() {}; virtual void output_footer() {}; void flush(std::ostream& os); + using Formatter::flush; // don't hide Formatter::flush(bufferlist &bl) void reset(); virtual void open_array_section(const char *name); void open_array_section_in_ns(const char *name, const char *ns); -- 2.39.5