Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[src] Elevenize KALDI_DISALLOW_COPY_AND_ASSIGN() (kaldi-asr#4547)
Before C++11 we declared the same members private, usually at the very end of a class declaration. With standardization of the delete keyword and adoption of the pattern, it is now idiomatic to make deleted members public. The rationale is that deletion of copy members is part of the public behavior of a type, namely its uncopyability, and should be expressed in and readable from the public: section alone. Google coding style, which we are generally following, does not mention the 'DISALLOW_COPY_AND_ASSIGN' macro any more, and recommends using the '= delete;' construct directly. From https://google.github.io/styleguide/cppguide.html#Copyable_Movable_Types: > Every class's public interface must make clear which copy and move > operations the class supports. This should usually take the form of > explicitly declaring and/or deleting the appropriate operations in > the public section of the declaration. Examples from the guide use the delete keyword straight without any macro, but I think we should make an exception and continue using the macro, which is more self-explanatory. clang-tidy gets angry at non-public deleted members, too.
- Loading branch information