Skip to content

Conversation

@YexuanXiao
Copy link
Contributor

Even with /W3, MSVC doesn't respect the [[deprecated]] attribute of template specializations (DevCom-10948908).
Therefore, the macro _CXX20_DEPRECATE_VOLATILE has no effect with tuple_size, tuple_elements, variant_size and variant_alternatives.

Due to another bug of MSVC, applying the [[deprecated]] attribute directly to type still has no effect, so it can only be applied to _Mybase. Since my attempt to reproduce it failed, I cannot report it as another bug. When DevCom-10948908 is fixed, this bug may still persist, but all two workaround can be removed.

@YexuanXiao YexuanXiao requested a review from a team as a code owner August 8, 2025 02:06
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Aug 8, 2025
@YexuanXiao

This comment has been minimized.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Work In Progress in STL Code Reviews Aug 8, 2025
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Aug 8, 2025
@YexuanXiao
Copy link
Contributor Author

This issue also exists in Clang19 and Clang20, but it will be fixed in Clang21. See commit.

@YexuanXiao
Copy link
Contributor Author

@StephanTLavavej What is the difference between checks numbered 3, 4, and others in Build and Test x64 x64? They unexpectedly passed some new tests.

@MattStephanson
Copy link
Contributor

MattStephanson commented Aug 10, 2025

What is the difference between checks numbered 3, 4, and others in Build and Test x64 x64? They unexpectedly passed some new tests.

#1414 originally introduced this feature, but #2794 concisely explains it:

We use LLVM lit's "sharding" feature to split our large test suite across 8 VMs per architecture

If you go to the pipeline run webpage and click on the results tab, you'll see a list of the failed tests.

@YexuanXiao
Copy link
Contributor Author

What is the difference between checks numbered 3, 4, and others in Build and Test x64 x64? They unexpectedly passed some new tests.

#1414 originally introduced this feature, but #2794 concisely explains it:

We use LLVM lit's "sharding" feature to split our large test suite across 8 VMs per architecture

If you go to the pipeline run webpage and click on the results tab, you'll see a list of the failed tests.

Based on your explanation, I believe I have found a clue to reproduce the issue. Thanks!

@YexuanXiao
Copy link
Contributor Author

The workaround for tuple_element and variant_alternative does not work for Clang 19, even when applying the [[deprecated]] attribute directly to type instead of _Mybase. It's as tricky to simplify to reproduce as the MSVC bug. I can't figure out how to implement a workaround for it.

@YexuanXiao
Copy link
Contributor Author

The MSVC team believes a CWG issue is needed, so it may not be fixed in the short term. How should STL adapt to this situation? @StephanTLavavej

@StephanTLavavej
Copy link
Member

@YexuanXiao Thanks for looking into this. Because MSVC's behavior is unlikely to change in the moderate future and the impact of missing deprecation warnings for volatile machinery is highly limited, I believe I would prefer to abandon this attempt. I appreciate the effort you've put into it, but at this point I don't think making changes here is worth the complexity, risk, and time.

@YexuanXiao YexuanXiao closed this Aug 17, 2025
@github-project-automation github-project-automation bot moved this from Work In Progress to Done in STL Code Reviews Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants