Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

Fixes #4506.

Remarks: The constants are put into a new base class to avoid affecting DLL interface. I've verified this with dumpbin /export msvcp140_oss.dll (with unchanged output).

Initially I thought it might be wanted to keep these constants enumerators (which are prvalues), see also LWG-3998. However, it seems intentional that ctype_base::mask is short (as shown by the comment), and it's impossible to make enumerators be of type short. So now I think it's better to do what the standard says, which also avoids type mismatch.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner February 8, 2026 05:51
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Feb 8, 2026
@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Feb 8, 2026
@StephanTLavavej

This comment was marked as outdated.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Feb 8, 2026
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Feb 9, 2026
@StephanTLavavej

This comment was marked as outdated.

@StephanTLavavej StephanTLavavej moved this from Merging to Work In Progress in STL Code Reviews Feb 10, 2026
@StephanTLavavej
Copy link
Member

This failed the x86 internal build, need to investigate:

 120:28>EXEC : error M001: Type 'std.ctype<wchar_t>' (msvcp140.dll!std.ctype<wchar_t>) has been changed. Size before: 68, Size after: 72 [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>EXEC : error M010: Function '?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z' (msvcp140.dll!?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z) has been removed from the above type. [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>EXEC : error M010: Function '?do_widen@?$ctype@G@std@@MBEGD@Z' (msvcp140.dll!?do_widen@?$ctype@G@std@@MBEGD@Z) has been removed from the above type. [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>EXEC : error M001: Type 'std.ctype_base' (msvcp140.dll!std.ctype_base) has been changed. Size before: 8, Size after: 12 [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>EXEC : error M010: Function '??_E?$codecvt@DDU_Mbstatet@@@std@@MAEPAXI@Z' (msvcp140.dll!??_E?$codecvt@DDU_Mbstatet@@@std@@MAEPAXI@Z) has been removed from the above type. [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>EXEC : error M101: Type 'std.ctype_base.<unnamed-enum-alnum>' (msvcp140.dll!std.ctype_base.<unnamed-enum-alnum>) has been removed. [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]
 120:28>D:\msvc\src\vctools\VCTools.MPD.targets(64,5): error MSB3075: The command "D:\msvc\src\tools\Max\tools\MaxMPDCompat.exe D:\msvc\src\CompatibilityData\x86ret\MPDFiles\i386\msvcp140.dll.mpd D:\msvc\binaries\x86chk\MPDFiles\i386\msvcp140.dll.mpd" exited with code 5. Please verify that you have sufficient rights to run this command. [D:\msvc\src\vctools\crt\github\stl\msbuild\stl_base\md\msvcp_base_md_kernel32.vcxproj]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue

Projects

Status: Work In Progress

Development

Successfully merging this pull request may close these issues.

LWG-4037 Static data members of ctype_base are not yet required to be usable in constant expressions

2 participants