From 52b4961ae17c9c161945569ce4617e90032c822e Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Mon, 10 Sep 2018 09:47:35 +0200 Subject: [PATCH] Disallow assign by deleting correct assign signature Bug: chromium:881453 Change-Id: I80e74d0ed37d98b3472a31a42c3468f1bdbbb950 Reviewed-on: https://webrtc-review.googlesource.com/99061 Reviewed-by: Karl Wiberg Commit-Queue: Danil Chapovalov Cr-Commit-Position: refs/heads/master@{#24651} --- rtc_base/constructormagic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtc_base/constructormagic.h b/rtc_base/constructormagic.h index 646a058ce3..6b6e83cb47 100644 --- a/rtc_base/constructormagic.h +++ b/rtc_base/constructormagic.h @@ -12,7 +12,8 @@ #define RTC_BASE_CONSTRUCTORMAGIC_H_ // Put this in the declarations for a class to be unassignable. -#define RTC_DISALLOW_ASSIGN(TypeName) void operator=(const TypeName&) = delete +#define RTC_DISALLOW_ASSIGN(TypeName) \ + TypeName& operator=(const TypeName&) = delete // A macro to disallow the copy constructor and operator= functions. This should // be used in the declarations for a class.