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/c6392.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This rule was added in Visual Studio 2022 17.8.
13
13
14
14
## Remarks
15
15
16
-
C++ supports wide character streams such as `std::wostringstream`, and nonwide character streams such as `std::ostringstream`. Trying to print a wide string literal to a nonwide stream calls the `void*` overload of `operator<<`. This overload prints the address of the wide string literal instead of the value.
16
+
C++ supports wide character streams such as `std::wostringstream`, and nonwide character streams such as `std::ostringstream`. Trying to print a wide string to a nonwide stream calls the `void*` overload of `operator<<`. This overload prints the address of the wide string instead of the value.
17
17
18
18
Code analysis name: `STREAM_OUTPUT_VOID_PTR`
19
19
@@ -29,7 +29,7 @@ int main() {
29
29
}
30
30
```
31
31
32
-
There are multiple ways to fix this error. If printing the pointer value is unintended, use a nonwide string literal:
32
+
There are multiple ways to fix this error. If printing the pointer value is unintended, use a nonwide string:
33
33
34
34
```cpp
35
35
#include<iostream>
@@ -49,7 +49,7 @@ int main() {
49
49
}
50
50
```
51
51
52
-
If the behavior is intentional, silence the warning by using an explicit cast:
52
+
If the behavior is intentional, make the intention explicit and silence the warning by using an explicit cast:
0 commit comments