-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<mdspan>: Using std::mdspan results in multiple warnings (C5246) #4477
Comments
In general, the STL doesn't attempt to be In this case, I can't immediately see what code is triggering these warnings; the line numbers don't make sense to me. |
The warning actually comes form here. Lines 121 to 124 in d6efe94
The implementation currently depends on brace elision in aggregate initialization, but I think this should be OK. IMO warning C5246 doesn't make much sense. |
So you would say this is a compiler issue? I had a feeling it would be, but since the |
IMHO warning on "the initialization of a subobject should be wrapped in braces" is itself a bad design. Such warning discourages initializing At least I think we should suppress the warning in |
We talked about this at the weekly maintainer meeting. While the STL doesn't attempt to be The place to do so is around here: Line 786 in 243cffc
Note that we capture the exact warning text, followed by "(/Wall)" for off-by-default warnings. |
Describe the bug
When just initializing an
std::mdspan
with dynamic extents multiple warnings (C5246) are produced during compilation.Command-line test case
multiple C5246 warnings occur.
Expected behavior
Compiles without warnings.
STL version
The text was updated successfully, but these errors were encountered: