Created
May 13, 2014 09:02
-
-
Save leesei/90e1714aa3f419522799 to your computer and use it in GitHub Desktop.
#c #evil-c-tor #c-tor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A macro to disallow the copy constructor and operator= functions | |
// This should be used in the private: declarations for a class | |
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ | |
TypeName(const TypeName&); \ | |
void operator=(const TypeName&) | |
// An older, deprecated, politically incorrect name for the above. | |
// NOTE: The usage of this macro was baned from our code base, but some | |
// third_party libraries are yet using it. | |
// TODO(tfarina): Figure out how to fix the usage of this macro in the | |
// third_party libraries and get rid of it. | |
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment