mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 16:06:39 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user