[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 3 11:34:53 PDT 2023


================
@@ -3,22 +3,34 @@
 modernize-use-equals-delete
 ===========================
 
+Prior to C++11, the only way to "delete" a given function was to make it
+``private`` and without definition, to generate a compiler error (calling
+private function) or a linker error (undefined reference).
+
+After C++11, the more idiomatic way to achieve this is by marking the functions
+as ``= delete``, and keeping them in the ``public`` section.
+
 This check marks unimplemented private special member functions with ``= delete``.
----------------
PiotrZSL wrote:

This is duplication. Saying twice about function marked as delete.

https://github.com/llvm/llvm-project/pull/65231


More information about the cfe-commits mailing list