rohanjain101 opened a new pull request, #986:
URL: https://github.com/apache/iceberg-cpp/pull/986
## 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 over
a parameter pack. 14.42 rejects both (C3546/C2326/C3520). They are
replaced with a class-template trait and helper
function templates.
- `manifest_group.cc` used a conditional operator over two move-only
`Result<ManifestEntryStreamPtr>` prvalues.
14.42 tries to copy them (C2280). The stream is now selected with if/else
in a small helper.
- `snapshot_update.cc` and `merging_snapshot_update_test.cc` used the C++23
`0UZ` literal, which 14.42 does not
support (C3688). It is replaced with `size_t{0}`.
- `cache_test.cc` used a lambda with a trailing return type and no parameter
list (`[&] -> Status`). This is C++23
syntax (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
- MSVC 14.51, static, Release, bundle enabled: full build succeeds and all
17 ctest suites pass, including
`util_test` (`ParallelCollect`/executor and cache tests), `scan_test`,
`manifest_test` and `table_update_test`.
- MSVC 14.42 (19.42.34439): `iceberg_static`, `iceberg_data_static` and
every changed source file, including the
changed tests, now compile.
- clang-format reports no changes for the modified files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]