Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@StephanTLavavej
Copy link
Member

Fixes #4425.

This globally silences the warning because I don't think it's ever useful for the STL to emit it. If the user gives us a highly-aligned type, and we have to build another type with it, warning about padding is unlikely to be productive - presumably they had reasons for making their type highly-aligned, and it's not like they can change the layout of our type. (Yeah, in theory maybe they could request a different order of tuple elements or something, but most of the time it's not going to be actionable.) And if the warning is emitted purely from STL code, as in my test case, it's extremely annoying. Finally, this is just a performance warning - it has no impact on correctness.

@StephanTLavavej StephanTLavavej added bug Something isn't working ranges C++20/23 ranges labels Feb 26, 2024
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner February 26, 2024 21:28
AlexGuteniev

This comment was marked as resolved.

@StephanTLavavej

This comment was marked as resolved.

@CaseyCarter CaseyCarter removed their assignment Feb 28, 2024
@StephanTLavavej StephanTLavavej self-assigned this Feb 29, 2024
@StephanTLavavej
Copy link
Member Author

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

@StephanTLavavej StephanTLavavej merged commit a6c2a72 into microsoft:main Feb 29, 2024
@StephanTLavavej StephanTLavavej deleted the paddington branch February 29, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ranges C++20/23 ranges

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

<ranges>: views::cartesian_product and views::filter emit spurious warning C4324 'structure was padded due to alignment specifier'

3 participants