src: inline macro DISALLOW_COPY_AND_ASSIGN
This one is similar like https://github.com/nodejs/node/pull/25764, following Effective Modern C++ Items 11: Prefer deleted functions to private undefined ones
.
This time I tried this on godbolt. When deleted functions are declared private, GCC 6.2 error message is not very clear. GCC 8.x and Clang 7.x error message is clear. demo: https://godbolt.org/z/k6O9wc.
This commit also add commit use deleted function instead of private function in class AsyncWrap
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines