From 423c7d862f5a4d9edd263f7327feb54985ce3790 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 11 Aug 2021 12:00:47 +0800 Subject: [PATCH] neorados: build without "using namespace std" * add "std::" prefix in headers * add "using" declarations in .cc files. so we don't rely on "using namespace std" in one or more included headers. Signed-off-by: Kefu Chai --- src/neorados/cls/fifo.cc | 2 ++ src/neorados/cls/fifo.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/neorados/cls/fifo.cc b/src/neorados/cls/fifo.cc index fa99275b25f..f95ede5ff8f 100644 --- a/src/neorados/cls/fifo.cc +++ b/src/neorados/cls/fifo.cc @@ -35,6 +35,8 @@ #include "fifo.h" +using namespace std; + namespace neorados::cls::fifo { namespace bs = boost::system; namespace cb = ceph::buffer; diff --git a/src/neorados/cls/fifo.h b/src/neorados/cls/fifo.h index 05865dccace..4c7ba4779ec 100644 --- a/src/neorados/cls/fifo.h +++ b/src/neorados/cls/fifo.h @@ -757,7 +757,7 @@ private: auto e = ba::get_associated_executor(handler, get_executor()); auto a = ba::get_associated_allocator(handler); _read_meta_(r, oid, ioc, - nullopt, + std::nullopt, ca::bind_ea( e, a, [this,