From 77b3a250ea9e7c6d01b6eba1dfe70568b7e1fabc Mon Sep 17 00:00:00 2001 From: "Piotr Paczkowski (trzeci.eu)" Date: Fri, 20 Dec 2019 09:39:06 +0100 Subject: Review notes: Return T& from assignment operators --- googletest/include/gtest/internal/gtest-port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 95a9479..1a7f80c 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -671,7 +671,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow copy operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_ASSIGN_(type) \ - void operator=(type const &) = delete + type& operator=(type const &) = delete // A macro to disallow copy constructor and operator= // This should be used in the private: declarations for a class. @@ -682,7 +682,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow move operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_MOVE_ASSIGN_(type) \ - void operator=(type &&) = delete + type& operator=(type &&) = delete // A macro to disallow move constructor and operator= // This should be used in the private: declarations for a class. -- cgit v0.12