]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
neorados: build without "using namespace std"
authorKefu Chai <kchai@redhat.com>
Wed, 11 Aug 2021 04:00:47 +0000 (12:00 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Aug 2021 04:23:38 +0000 (12:23 +0800)
* 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 <kchai@redhat.com>
src/neorados/cls/fifo.cc
src/neorados/cls/fifo.h

index fa99275b25f96cbf3350830f35a72504b89070d1..f95ede5ff8f61ead4f7c8d5cf29ef9f02f9a767d 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "fifo.h"
 
+using namespace std;
+
 namespace neorados::cls::fifo {
 namespace bs = boost::system;
 namespace cb = ceph::buffer;
index 05865dccace3c4e5c92261ce2d36ad160db4d4e9..4c7ba4779ecce0a87dd2a4086c55a9bdfa540d9a 100644 (file)
@@ -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,