Repository navigation
Replace remaining std::invoke_result with decltype for MSVC 14.52 - #210
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
…MSVC 14.52 (munich-data-engineering#805) Follow-up to upstream PR munich-data-engineering#794, which converted std::invoke_result_t sites to direct decltype expressions to work around MSVC 14.52 C3539 ('type': a template-argument cannot be a type that contains 'auto'), but missed the remaining typename std::invoke_result<...>::type sites. - Convert field_names_t.hpp (directly hit by rfl::json::read<T> in munich-data-engineering#805) and drop its unused <functional> include. - Convert internal/field_tuple_t.hpp, internal/Field.hpp, internal/flattened_ptr_tuple_t.hpp, and internal/move_from_named_tuple.hpp (also resolving the overloaded nt_to_ptr_named_tuple<T>(std::declval<T&>()) call). - Convert the remaining 3 std::invoke_result<F, T>::type sites in internal/cpp20/Result.hpp and harmonize transform && to decltype(_f(...)) so all 4 monadic overloads match the actual call expression and const&/&& value category.
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.
Upstream PR: munich-data-engineering/reflect-cpp#806 · Addresses munich-data-engineering/reflect-cpp#805 · Follow-up to munich-data-engineering/reflect-cpp#794
Problem
MSVC 14.52 rejects basic
rfl::json::read<T>()withC3539whenstd::invoke_resultreceives a function template with a deducedautoreturn type.Upstream PR #794 replaced the
std::invoke_result_tsites withdecltype(...), but missed six headers still usingstd::invoke_result<...>::type—includingfield_names_t, which every struct read hits.Summary
std::invoke_result<...>::typesites with directdecltype(...)call expressions (leaving zerostd::invoke_resultuses in public or internal headers) and drops an unused<functional>include.move_from_named_tuple.hppand brings all fourcpp20::Resultmonadic overloads onto the samedecltype(_f(...))pattern.For Agents
upstream-queue(b535434b) · Score94/100(S=28,M=29,D=22,R=15) ·+14/-14(6f)queue-tests/json/test_invoke_result_decltype.cppCHECK_HEADERS36/36PASS (0 warnings, Clang 23 & GCC 13 across C++20 / C-arrays / C++23std::expected); upstream CI609/609PASS on Clang 23 & GCC 13;queue-tests/229/229PASS + ASan/UBSan/LSan3/3PASS.0remainingstd::invoke_result/std::result_of/std::is_invocable*/ uncalleddecltype(auto-fn)sites acrossinclude/andsrc/(including C++26 headers).upstream/main(aaa991b5), no parent dependencies. When opening upstream, swap top line toCloses #805and strip this block.