Review notes: Return T& from assignment operators

This commit is contained in:
Piotr Paczkowski (trzeci.eu) 2019-12-20 09:39:06 +01:00 committed by GitHub
parent 9d8222ad66
commit 77b3a250ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -671,7 +671,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// A macro to disallow copy operator= // A macro to disallow copy operator=
// This should be used in the private: declarations for a class. // This should be used in the private: declarations for a class.
#define GTEST_DISALLOW_ASSIGN_(type) \ #define GTEST_DISALLOW_ASSIGN_(type) \
void operator=(type const &) = delete type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator= // A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class. // 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= // A macro to disallow move operator=
// This should be used in the private: declarations for a class. // This should be used in the private: declarations for a class.
#define GTEST_DISALLOW_MOVE_ASSIGN_(type) \ #define GTEST_DISALLOW_MOVE_ASSIGN_(type) \
void operator=(type &&) = delete type& operator=(type &&) = delete
// A macro to disallow move constructor and operator= // A macro to disallow move constructor and operator=
// This should be used in the private: declarations for a class. // This should be used in the private: declarations for a class.