We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84b28f6 commit 242396cCopy full SHA for 242396c
docs/error-messages/compiler-errors-2/compiler-error-c2574.md
@@ -16,14 +16,16 @@ Neither destructors nor constructors can be declared **`static`**.
16
17
## Example
18
19
-The following sample generates C2574:
+The following example generates C2574:
20
21
```cpp
22
// C2574.cpp
23
// compile with: /c
24
-class A {
25
- virtual static ~A(); // C2574
26
- // try the following line instead
27
- // virtual ~A();
+struct S
+{
+ static S() {} // C2574
+
28
+ // Try the following line instead:
29
+ // S() {}
30
};
31
```
0 commit comments