From: Max Kellermann Date: Wed, 30 Jul 2025 05:28:35 +0000 (+0200) Subject: tools/ceph-dencoder: remove "using namespace std" X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=47117d9f16efef606310e6eeadd676a6f4cf0e48;p=ceph.git tools/ceph-dencoder: remove "using namespace std" This breaks the ARM-NEON build: /usr/lib/gcc/aarch64-linux-gnu/14/include/arm_neon.h:2632:31: error: reference to ‘float16_t’ is ambiguous 2632 | __extension__ extern __inline float16_t | ^~~~~~~~~ /usr/include/c++/14/stdfloat:40:9: note: candidates are: ‘using std::float16_t = _Float16’ 40 | using float16_t = _Float16; | ^~~~~~~~~ /usr/lib/gcc/aarch64-linux-gnu/14/include/arm_neon.h:74:16: note: ‘typedef __fp16 float16_t’ 74 | typedef __fp16 float16_t; | ^~~~~~~~~ Signed-off-by: Max Kellermann --- diff --git a/src/tools/ceph-dencoder/common_types.cc b/src/tools/ceph-dencoder/common_types.cc index fa763c3bbd9..7c894ab3761 100644 --- a/src/tools/ceph-dencoder/common_types.cc +++ b/src/tools/ceph-dencoder/common_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/mds_types.cc b/src/tools/ceph-dencoder/mds_types.cc index 94280477a5b..cee0779e48b 100644 --- a/src/tools/ceph-dencoder/mds_types.cc +++ b/src/tools/ceph-dencoder/mds_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/nvmeof_types.cc b/src/tools/ceph-dencoder/nvmeof_types.cc index 86b76e43741..645f8c6494a 100644 --- a/src/tools/ceph-dencoder/nvmeof_types.cc +++ b/src/tools/ceph-dencoder/nvmeof_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/osd_types.cc b/src/tools/ceph-dencoder/osd_types.cc index 13a90685bc8..0170179a804 100644 --- a/src/tools/ceph-dencoder/osd_types.cc +++ b/src/tools/ceph-dencoder/osd_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/rbd_types.cc b/src/tools/ceph-dencoder/rbd_types.cc index e04efc30d52..81d4fa7e5ed 100644 --- a/src/tools/ceph-dencoder/rbd_types.cc +++ b/src/tools/ceph-dencoder/rbd_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/rgw_types.cc b/src/tools/ceph-dencoder/rgw_types.cc index 79688b5343f..2fe444362a4 100644 --- a/src/tools/ceph-dencoder/rgw_types.cc +++ b/src/tools/ceph-dencoder/rgw_types.cc @@ -1,6 +1,5 @@ #include "acconfig.h" #include -using namespace std; #include "include/ceph_features.h" #define TYPE(t) diff --git a/src/tools/ceph-dencoder/str.h b/src/tools/ceph-dencoder/str.h index 7ff1d0794b5..defc224c613 100644 --- a/src/tools/ceph-dencoder/str.h +++ b/src/tools/ceph-dencoder/str.h @@ -8,7 +8,7 @@ class string_wrapper { std::string s; public: string_wrapper() = default; - string_wrapper(string s1) + string_wrapper(std::string s1) : s(s1) {}