[PATCH] D16376: clang-tidy check: rule-of-five
Jonathan B Coe via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 3 14:21:43 PST 2016
jbcoe planned changes to this revision.
jbcoe added a comment.
If the destructor is user-declared then I need to `=delete` the compiler-generated copy constructor and copy assignment operator (if they are not defined, if either is defined then they are already handled by this check).
The move constructor and move assignment operator do not suffer from deprecated compiler behaviour so do not need to be explicitly deleted if the destructor is user-declared. Perhaps they should be though as this is called 'rule-of-five' (for now).
I think that deleting special member functions in the presence of a user-defined destructor is the right thing to do even if the user has defined the destructor as `=default` otherwise the check will go against the intention of the standard.
http://reviews.llvm.org/D16376
More information about the cfe-commits
mailing list