Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

These buffers are not overaligned and should only be used for the purpose of storage providing, so it should be safe and simpler to use aligned unsigned char arrays.

These buffers are not overaligned and should only be used for the
purpose of storage providing, so it should be safe and simpler to use
aligned `unsigned char` arrays.
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Oct 26, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Oct 26, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Oct 28, 2025
VSO-2616030 /clr /std:c++20 alignas emits bogus error C3645:
'main::<lambda_1>::<lambda_invoker_clrcall>':
__clrcall cannot be used on functions compiled to native code
@StephanTLavavej
Copy link
Member

I've pushed a commit to perma-workaround VSO-2616030 "/clr /std:c++20 alignas emits bogus error C3645: 'main::<lambda_1>::<lambda_invoker_clrcall>': __clrcall cannot be used on functions compiled to native code", which I fully reduced and reported to be a good kitty. This is specific to storing the now-alignas-using mutex as a local variable within a lambda taking a UDT parameter (in this case stop_token). Moving the mutex and condition_variable_any outside of the lambda and capturing them by reference, as tests later in this file already do, (1) avoids the compiler bug, (2) is more realistic, and (3) preserves the test semantics, so I chose this as a perma-workaround.

As a drive-by cleanup, I couldn't resist removing unnecessary static from non-array constexpr variables.

@StephanTLavavej StephanTLavavej merged commit e91e27b into microsoft:main Oct 29, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Oct 29, 2025
@StephanTLavavej
Copy link
Member

Another deprecated type trait usage bites the dust! 💀 ☠️ 🎃

@frederick-vs-ja frederick-vs-ja deleted the thread-storage-buffers branch October 29, 2025 16:01
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.

2 participants