[libcu++] Suppress MSVC warning C5285 at the forward declaration of `std::tuple` #12808
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 215 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12808"
general
weight: 0.35
Jacobfaib
Description
Starting with toolset 14.51, the MSVC STL marks
std::tuplewith[[msvc::no_specializations]]. For an explicit specialization, MSVC reports the violation at the first declaration of the primary template and uses the warning state at that line. The STL disables C5285 in its own headers, so its ownstd::tuple<>in<tuple>is silent as long as<utility>declaresstd::tuplefirst.If a libcu++ header comes first, the first declaration is the forward declaration in
<cuda/std/__fwd/tuple.h>, and a later<tuple>makes MSVC warn there about the STL's ownstd::tuple<>:In host code, even
<cuda/std/type_traits>followed by<vector>warns, and C5285 is a level 1 warning, so/WXbuilds break. nvcc is not affected, becausecuda_runtime.hincludes<utility>before any libcu++ header.This PR suppresses C5285 around the forward declaration.
std::tupleis the only template marked by the MSVC STL that libcu++, Thrust, CUB or cudax forward declare or specialize. When every libcu++ public header is compiled host-only with MSVC 19.51 at/W4, followed by every STL header, 73 of 254 headers warn in C++17 and 72 in C++20 and C++23 without this change, and none with it.CI's newest MSVC is 14.50, whose STL does not mark
std::tupleyet. With 14.51, the existing host-only public header tests catch this, for example for<cuda/std/string_view>.Checklist