| #ifndef BASE_MACROS_H_ |
| #define BASE_MACROS_H_ |
| |
| #ifndef COBALT_PENDING_CLEAN_UP |
| #error "remove these" |
| #endif |
| |
| // Put this in the declarations for a class to be uncopyable. |
| #define DISALLOW_COPY(TypeName) \ |
| TypeName(const TypeName&) = delete |
| |
| // Put this in the declarations for a class to be unassignable. |
| #define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete |
| |
| // Put this in the declarations for a class to be uncopyable and unassignable. |
| #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| DISALLOW_COPY(TypeName); \ |
| DISALLOW_ASSIGN(TypeName) |
| |
| #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ |
| TypeName() = delete; \ |
| DISALLOW_COPY_AND_ASSIGN(TypeName) |
| |
| #endif // BASE_MACROS_H_ |