Repository navigation
fix: build with MSVC 14.42 (VS 2022 17.12) - #986
Open
rohanjain101 wants to merge 2 commits into
Open
rohanjain101 wants to merge 2 commits into
rohanjain101 wants to merge 2 commits into
Conversation
The README lists MSVC 2022+ as supported, but the sources do not compile
with MSVC 14.42. Newer MSVC versions are unaffected. This change makes no
functional change:
- ParallelCollect used a lambda in its requires-clause and lambdas expanded
over a parameter pack, which 14.42 rejects (C3546/C2326/C3520). Replace
them with a class-template trait and helper function templates.
- ManifestGroup used a conditional operator over two move-only
Result<ManifestEntryStreamPtr> prvalues, which 14.42 tries to copy (C2280).
Select the stream with if/else in a small helper instead.
- Replace the C++23 0UZ literal, which 14.42 does not support (C3688), with
size_t{0}.
- Add the empty parameter list to a lambda with a trailing return type in
cache_test.cc. Omitting it is C++23 syntax (P1102) that 14.42 rejects.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7 tasks done
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Make the sources compile with MSVC 14.42 (VS 2022 17.12). The README lists MSVC 2022+ as supported, but the
current sources fail to build with 14.42. Newer MSVC versions are unaffected. There is no functional change.
ParallelCollect(util/executor_util_internal.h) used a lambda in its requires-clause and lambdas expanded overa parameter pack. 14.42 rejects both (C3546/C2326/C3520). They are replaced with a class-template trait and helper
function templates.
manifest_group.ccused a conditional operator over two move-onlyResult<ManifestEntryStreamPtr>prvalues.14.42 tries to copy them (C2280). The stream is now selected with if/else in a small helper.
snapshot_update.ccandmerging_snapshot_update_test.ccused the C++230UZliteral, which 14.42 does notsupport (C3688). It is replaced with
size_t{0}.cache_test.ccused a lambda with a trailing return type and no parameter list ([&] -> Status). This is C++23syntax (P1102) that 14.42 rejects. The empty parameter list is added.
Why
vcpkg carries these changes as a downstream patch for 0.4.0 (microsoft/vcpkg#54315). Upstreaming them lets that
patch be dropped after the next release.
Testing
util_test(ParallelCollect/executor and cache tests),scan_test,manifest_testandtable_update_test.iceberg_static,iceberg_data_staticand every changed source file, including thechanged tests, now compile.