You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/c26432.md
+13-9
Original file line number
Diff line number
Diff line change
@@ -30,29 +30,33 @@ Special operations such as constructors are assumed to alter the behavior of typ
30
30
31
31
## Example
32
32
33
-
In this example, `warning::S` defines only a default constructor and a destructor. The `no_warning::S` declaration defines all five special member functions.
33
+
In this example, `warning::S` defines only a default constructor and a destructor. The `no_warning::S` declaration defines or deletes all five special member functions.
34
34
35
35
```cpp
36
36
// C26432.cpp
37
37
namespacewarning
38
38
{
39
39
struct S
40
40
{
41
-
S() noexcept {}
42
-
~S() {} // C26432 because only the constructor and destructor are explicitly defined.
41
+
S() noexcept { ++_count; }
42
+
~S() { --_count; } // C26432 because only the constructor and destructor are explicitly defined.
0 commit comments