Debian Codegraph @

llvm-project/clang-tools-extra/docs/clang-tidy/checks/modernize/use-equals-delete.rst

raw
1 .. title:: clang-tidy - modernize-use-equals-delete
2
3 modernize-use-equals-delete
4 ===========================
5
6 This check marks unimplemented private special member functions with ``= delete``.
7 To avoid false-positives, this check only applies in a translation unit that has
8 all other member functions implemented.
9
10 .. code-block:: c++
11
12 struct A {
13 private:
14 A(const A&);
15 A& operator=(const A&);
16 };
17
18 // becomes
19
20 struct A {
21 private:
22 A(const A&) = delete;
23 A& operator=(const A&) = delete;
24 };
25
26
27 .. option:: IgnoreMacros
28
29 If this option is set to `true` (default is `true`), the check will not warn
30 about functions declared inside macros.