/Zc:checkGwOdr
(Enforce Standard C++ ODR violations under /Gw
)
This switch enforces C++ standards conformance when using /Gw
(Optimize global data). When using /Gw
, certain One Definition Rule (ODR) violations are ignored. This flag ensures that the appropriate errors are raised.
Syntax
/Zc:checkGwOdr
[-
]
Remarks
This switch is off by default.
To see an example of ODR violations that are ignored when using /Gw
, see Standards conformance improvements to /Gw.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Command Line property page.
Modify the Additional Options property to include
/Zc:checkGwOdr
or/Zc:checkGwOdr-
and then choose OK.
See also
/Zc
(Conformance)
One Definition Rule (ODR)
Standards conformance improvements to /Gw
Tagasiside
https://aka.ms/ContentUserFeedback.
Varsti tulekul: 2024. aasta jooksul tühistame GitHubi probleemide funktsiooni sisutagasiside mehhanismina ja asendame selle uue tagasisidesüsteemiga. Lisateabe saamiseks vtEsita ja vaata tagasisidet