Skip to content

[Fix] Revert C++20-only lambda captures for C++17 build#19808

Merged
MasterJH5574 merged 1 commit into
apache:v0.25.0from
MasterJH5574:tvm-dev/2026-06-17-c++17
Jun 17, 2026
Merged

[Fix] Revert C++20-only lambda captures for C++17 build#19808
MasterJH5574 merged 1 commit into
apache:v0.25.0from
MasterJH5574:tvm-dev/2026-06-17-c++17

Conversation

@MasterJH5574

Copy link
Copy Markdown
Contributor

Revert four explicit-this lambda captures ([=, this, ...] -> [=, ...]) in run_codegen.cc, inject_software_pipeline.cc, and cudnn_json_runtime.cc.

These were introduced by the C++20 baseline upgrade (#19734); after reverting the baseline to C++17, MSVC rejects capturing 'this' explicitly under a '=' capture-default (error C3791) -- that form is C++20-only. GCC and Clang accept it as an extension in C++17, which is why only the Windows wheel build failed. Dropping the explicit 'this' ('=' captures it implicitly in C++17) restores the MSVC build with no behavior change.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Revert four explicit-this lambda captures ([=, this, ...] -> [=, ...]) in
run_codegen.cc, inject_software_pipeline.cc, and cudnn_json_runtime.cc.

These were introduced by the C++20 baseline upgrade (apache#19734); after reverting
the baseline to C++17, MSVC rejects capturing 'this' explicitly under a '='
capture-default (error C3791) -- that form is C++20-only. GCC and Clang accept
it as an extension in C++17, which is why only the Windows wheel build failed.
Dropping the explicit 'this' ('=' captures it implicitly in C++17) restores the
MSVC build with no behavior change.
@MasterJH5574 MasterJH5574 force-pushed the tvm-dev/2026-06-17-c++17 branch from 47a0a4a to c7ba073 Compare June 17, 2026 04:13
@MasterJH5574 MasterJH5574 merged commit c7ba073 into apache:v0.25.0 Jun 17, 2026
3 of 7 checks passed
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.

2 participants