We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c192538 commit 5f29a81Copy full SHA for 5f29a81
1 file changed
docs/error-messages/compiler-errors-1/compiler-error-c2058.md
@@ -11,3 +11,16 @@ ms.assetid: 81e08e6b-15f7-41b4-980a-53763e19990c
11
constant expression is not integral
12
13
The context requires an integer constant expression.
14
+
15
+The following sample generates C2058:
16
17
+```cpp
18
+// C2058.cpp
19
+struct alignas(1.5) S {}; // C2058
20
21
+int main() {
22
+ int arr[1.5]; // C2058
23
+}
24
+```
25
26
+Possible resolutions include removing the construct or modifying the operand to an appropriate integer constant expression.
0 commit comments