This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 6fed7b23 Fix the linkage errors caused by duplicate symbols (#1936)
6fed7b23 is described below

commit 6fed7b2328a8ba324c5eaad6f3f5b39c213b3fe5
Author: Adonis Ling <adonis0...@gmail.com>
AuthorDate: Fri Oct 14 15:39:47 2022 +0800

    Fix the linkage errors caused by duplicate symbols (#1936)
---
 src/butil/class_name.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/butil/class_name.h b/src/butil/class_name.h
index 48babf79..29c91a9c 100644
--- a/src/butil/class_name.h
+++ b/src/butil/class_name.h
@@ -30,7 +30,7 @@ namespace butil {
 
 std::string demangle(const char* name);
 
-namespace detail {
+namespace {
 template <typename T> struct ClassNameHelper { static std::string name; };
 template <typename T> std::string ClassNameHelper<T>::name = 
demangle(typeid(T).name());
 }
@@ -39,7 +39,7 @@ template <typename T> std::string ClassNameHelper<T>::name = 
demangle(typeid(T).
 template <typename T> const std::string& class_name_str() {
     // We don't use static-variable-inside-function because before C++11
     // local static variable is not guaranteed to be thread-safe.
-    return detail::ClassNameHelper<T>::name;
+    return ClassNameHelper<T>::name;
 }
 
 // Get name of class |T|, in const char*.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to