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

caidj 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 e1db226  [Compile] avoid compile error after gcc11 with --std=c++20
     new 944a5cd  Merge pull request #1719 from hiberabyss/master
e1db226 is described below

commit e1db226aebe3dd37b913ed1a6684fcb9cc73ef24
Author: HongboLiu <[email protected]>
AuthorDate: Mon Mar 14 19:37:02 2022 +0800

    [Compile] avoid compile error after gcc11 with --std=c++20
---
 src/butil/memory/ref_counted.h     | 2 +-
 src/butil/stl_util.h               | 8 ++++----
 src/butil/threading/thread_local.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/butil/memory/ref_counted.h b/src/butil/memory/ref_counted.h
index 82704d8..5f01fc1 100644
--- a/src/butil/memory/ref_counted.h
+++ b/src/butil/memory/ref_counted.h
@@ -137,7 +137,7 @@ class RefCounted : public subtle::RefCountedBase {
   ~RefCounted() {}
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(RefCounted<T>);
+  DISALLOW_COPY_AND_ASSIGN(RefCounted);
 };
 
 // Forward declaration.
diff --git a/src/butil/stl_util.h b/src/butil/stl_util.h
index 19b638f..1cc15d9 100644
--- a/src/butil/stl_util.h
+++ b/src/butil/stl_util.h
@@ -172,8 +172,8 @@ void STLDeleteValues(T* container) {
 template<class T>
 class STLElementDeleter {
  public:
-  STLElementDeleter<T>(T* container) : container_(container) {}
-  ~STLElementDeleter<T>() { STLDeleteElements(container_); }
+  STLElementDeleter(T* container) : container_(container) {}
+  ~STLElementDeleter() { STLDeleteElements(container_); }
 
  private:
   T* container_;
@@ -184,8 +184,8 @@ class STLElementDeleter {
 template<class T>
 class STLValueDeleter {
  public:
-  STLValueDeleter<T>(T* container) : container_(container) {}
-  ~STLValueDeleter<T>() { STLDeleteValues(container_); }
+  STLValueDeleter(T* container) : container_(container) {}
+  ~STLValueDeleter() { STLDeleteValues(container_); }
 
  private:
   T* container_;
diff --git a/src/butil/threading/thread_local.h 
b/src/butil/threading/thread_local.h
index a49e46c..4eda937 100644
--- a/src/butil/threading/thread_local.h
+++ b/src/butil/threading/thread_local.h
@@ -106,7 +106,7 @@ class ThreadLocalPointer {
 
   SlotType slot_;
 
-  DISALLOW_COPY_AND_ASSIGN(ThreadLocalPointer<Type>);
+  DISALLOW_COPY_AND_ASSIGN(ThreadLocalPointer);
 };
 
 class ThreadLocalBoolean {

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to