Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MSVC has a new preprocessor (https://devblogs.microsoft.com/cppblog/announcing-full-support-for-a-c-c-conformant-preprocessor-in-msvc/). To compile code with MSVC and C++20 we need to use the new preprocessor (
/Zc:preprocessor
).This change updates cpprestsdk to use
/Zc:preprocessor
on versions of MSVC that support it (>= 16.6, which is _MSC_VER 1926).Without code changes,
/Zc:preprocessor
causes build breaks due to empty__VA_ARGS__
in the macros defined in CheckMacros.h and TestMacros.h. Those headers already have versions of the macros that use the conformant##__VA_ARGS__
syntax for non-MSVC compilers, so this change uses those existing macros for MSVC as well, on versions of MSVC that support/Zc:preprocessor
.