Skip to content

trystero: handler compiles on MSVC 14.52, its operation tables holding static member functions instead of lambdas - #8

Merged
pinhopro merged 1 commit into
mainfrom
fix/msvc-14.52-handler
Nov 19, 2026
Merged

pinhopro merged 1 commit into
mainfrom
fix/msvc-14.52-handler

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

What changes

trystero compiles on MSVC 14.52. The CI's windows-2025-vs2026 image (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 on msvc-14.5, all in handler.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 invoke lambda of operations_of, whose parameters expand Args, 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.

  • The two operation tables are now inline_operations<T> and allocated_operations<T>, whose static member functions do what the lambdas did; operations_of<T> takes their addresses through std::conditional_t. An inline target's rehome is its move, as before.
  • The changelog's relay line also says MSVC 14.52 builds are fixed. Unreleased already holds its ten lines, each at most 30 words.

Verified locally

  • MSVC 14.52.37025 (19.52.37029), from the local Wine lane rebuilt with that toolset: a handler of two targets of one signature, and the unit of the header-alone test alone-trystero-detail-action_wire, fail before the change with the CI's errors and compile after it; 14.51 compiled both before.
  • Both local MSVC lanes, 14.3 and 14.5 (now 14.52), over trystero's tests and examples: 47 pass on each, and the 20 failing actions are all the lane's known Wine stops (cl ends without a diagnostic on the units holding the native platform backend, and on Boost.JSON without exceptions), none new. Of the 22 tests the CI failed, 15 now compile and pass on 14.52 locally; the 7 others (the platform_* tests, diff_self_id_not_utf8, shared_no_exceptions) are among those stops, so only the Windows CI checks them.
  • clang (libc++) and GCC 14: every trystero test and example passes.
  • The lint, over trystero and hash: clean, clang-tidy included; clang-tidy over libstdc++ 14's headers on every native unit: clean.

The owner chose to merge without CI; main's next full CI checks it.

🤖 Generated with Claude Code

…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.
@pinhopro
pinhopro merged commit 9776b14 into main Nov 19, 2026
1 of 8 checks passed
@pinhopro
pinhopro deleted the fix/msvc-14.52-handler branch November 19, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant