Actually use = delete to mark constructors and operators we want to not exist. Just declaring them as private works, but it can confuse certain tools as it doesn't actually declare intent, and the C++11 way is more expressive anyway, so this is pure win

rdar://28960209

llvm-svn: 285216
This commit is contained in:
Enrico Granata
2016-10-26 18:12:52 +00:00
parent 68a423bf84
commit 0cd95447db

View File

@@ -157,8 +157,8 @@
/// assignment operators in C++ classes.
//----------------------------------------------------------------------
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &); \
const TypeName &operator=(const TypeName &)
TypeName(const TypeName &) = delete; \
const TypeName &operator=(const TypeName &) = delete
#endif // #if defined(__cplusplus)