You can use the /Zc compiler options to specify standard or Microsoft-specific compiler behavior.
When Visual Studio has implemented an extension to C or C++ that is not compatible with the standard, you can use a
/Zc conformance option to specify standard-conforming or Microsoft-specific behavior. For some options, the Microsoft-specific behavior is the default, to prevent large-scale breaking changes to existing code. In other cases, the default is the standard behavior, where improvements in security, performance, or compatibility outweigh the costs of breaking changes. The default setting of each conformance option may change in newer versions of Visual Studio. For more information about each conformance option, see the topic for the specific option. The /permissive- compiler option implicitly sets the conformance options that are not set by default to their conformant setting.
These are the
/Zc compiler options:
|alignedNew[-]||Enable C++17 over-aligned dynamic allocation (on by default in C++17).|
|auto[-]||Enforce the new Standard C++ meaning for
|__cplusplus[-]||Enable the __cplusplus macro to report the supported standard (off by default).|
|externConstexpr[-]||Enable external linkage for
|forScope[-]||Enforce Standard C++
|inline[-]||Remove unreferenced function or data if it is COMDAT or has internal linkage only (off by default).|
|noexceptTypes[-]||Enforce C++17 noexcept rules (on by default in C++17 or later).|
|referenceBinding[-]||A UDT temporary will not bind to an non-const lvalue reference (off by default).|
|rvalueCast[-]||Enforce Standard C++ explicit type conversion rules (off by default).|
|sizedDealloc[-]||Enable C++14 global sized deallocation functions (on by default).|
|strictStrings[-]||Disable string-literal to
|ternary[-]||Enforce conditional operator rules on operand types (off by default).|
|threadSafeInit[-]||Enable thread-safe local static initialization (on by default).|
|trigraphs[-]||Enable trigraphs (obsolete, off by default).|
|twoPhase-||Use non-conforming template parsing behavior (conforming by default).|
For more information about conformance issues in Visual C++, see Nonstandard Behavior.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.