Skip to content

Commit

Permalink
msvc: enable conformant __cplusplus macro
Browse files Browse the repository at this point in the history
  • Loading branch information
shuffle2 committed Apr 2, 2022
1 parent 25c173c commit e6ed77b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -265,7 +265,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# Fix non-conformant lambda behavior (constexpr variables shouldn't need capturing)
add_compile_options(/experimental:newLambdaProcessor)
# Fix various other non-conformant behaviors
add_compile_options(/Zc:externConstexpr,lambda,preprocessor)
add_compile_options(/Zc:__cplusplus,externConstexpr,lambda,preprocessor)

# Temporarily disable warnings to enable /Zc:preprocessor compatibility with WinSDK headers.
add_compile_options(
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProps/Base.props
Expand Up @@ -97,7 +97,7 @@
<!--Enable Standard Conformance-->
<ConformanceMode>true</ConformanceMode>
<!--Enforce some behaviors as standards-conformant when they don't default as such.-->
<AdditionalOptions>/Zc:externConstexpr,lambda,preprocessor,throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/Zc:__cplusplus,externConstexpr,lambda,preprocessor,throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
<!--Enable detailed debug info-->
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
<!--Treat sources as utf-8-->
Expand Down

0 comments on commit e6ed77b

Please sign in to comment.