You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently impossible to use the yvals header with the std module
yvals.h is not a STL header, so it should not be affected by the current limitation of mixing import std and includes.
Command-line test case
C:\Temp>type repro.cpp
import std;
#define align_val_t ignore_align_val_t // only here to silence the error of issue #4666
#include <yvals.h>
C:\Temp>cl.exe /std:c++latest /EHsc /nologo /c .\repro.cpp
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.40.33807\include\yvals.h(333): error C2011: 'std::_Uninitialized': 'enum' type redefinition
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.40.33807\include\yvals.h(333): note: see declaration of 'std::_Uninitialized'
Expected behavior
It should compile but does not
STL version
Microsoft Visual Studio Community 2022
Version 17.10.0 Preview 7.0
The text was updated successfully, but these errors were encountered:
Being part of the STL, <yvals.h> is definitely affected by our current implementation bug/limitation of import-before-include resulting in duplicated machinery (like the internal std::_Uninitialized type).
Also, because it's an internal header, user code shouldn't directly include <yvals.h>. (This is unlike <crtdbg.h>, which is a documented Microsoft-specific header.)
I'm going to resolve this as a duplicate of #4666, even though it's a bit different, because it's the same root cause which will need the same coordinated fix between the compiler and Standard Library to make arbitrary mixing of imports and includes work.
Describe the bug
It is currently impossible to use the yvals header with the std module
yvals.h is not a STL header, so it should not be affected by the current limitation of mixing import std and includes.
Command-line test case
Expected behavior
It should compile but does not
STL version
The text was updated successfully, but these errors were encountered: