Why does Code Analysis in Visual Studio Community 2022 report warning C6389 when iostream is included

50 Views Asked by At

I am making myself familiar with Code Analysis in Visual Studio Community 2022. Ruleset is default, but with this enabled: Ambiguous Intent: C6389 (Move to anonymous namespace).

I am testing the ruleset in a project created from a Console App template. No code has been modified or added. When running Code Analysis I get this reported: "warning C6389: Move '__empty_global_delete' to anonymous namespace or put a forward declaration in a common header included in this file." The warning goes away if I comment included iostream. The line referenced in the warning is the very last line of file that includes iostream.

I have encountered warning C6389 in other places in my code and have been able to remove them by following documentation. But when including iostream - no luck. Has anybody else had same issue?

RL

0

There are 0 best solutions below