Repository navigation
trystero: handler compiles on MSVC 14.52, its operation tables holding static member functions instead of lambdas - #8
Merged
Conversation
…t lambdas, since MSVC 14.52 converts no lambda whose parameters expand Args to a function pointer once a signature has a second target type MSVC 14.52.37025, which the CI's windows-2025-vs2026 image brought in place of 14.51.36231, refuses a handler of a signature with parameters as soon as operations_of is instantiated for a second target type of that signature (C2440, "no user-defined-conversion operator available" from the invoke lambda to R (*)(unsigned char*, Args&&...)), which every unit of trystero's detail does. The two tables are now inline_operations and allocated_operations, whose static member functions do what the lambdas did; an inline target's rehome is its move.
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 changes
trystero compiles on MSVC 14.52. The CI's
windows-2025-vs2026image (20261116.315.1) replaced MSVC 14.51.36231 with 14.52.37025, and main's full CI (webcpporg/webcpp run 44526929621) failed 22 of trystero's tests onmsvc-14.5, all inhandler.hpp(C2440 and C2131 at lines 277, 307 and 336). trystero itself had not changed.The cause: once a handler of one signature with parameters has a second target type, MSVC 14.52 no longer converts the
invokelambda ofoperations_of, whose parameters expandArgs, to its function pointer ("no user-defined-conversion operator available"). A single target per signature still compiles, which is why the smallest uses did not show it.inline_operations<T>andallocated_operations<T>, whose static member functions do what the lambdas did;operations_of<T>takes their addresses throughstd::conditional_t. An inline target'srehomeis itsmove, as before.Verified locally
alone-trystero-detail-action_wire, fail before the change with the CI's errors and compile after it; 14.51 compiled both before.platform_*tests,diff_self_id_not_utf8,shared_no_exceptions) are among those stops, so only the Windows CI checks them.The owner chose to merge without CI; main's next full CI checks it.
🤖 Generated with Claude Code