[libcxx-commits] [libcxx] [libc++][windows] Use _wsetlocale() in __locale_guard (PR #160479)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 26 03:15:02 PDT 2025


lb90 wrote:

I have now also modified `locale_gard.h` under `include/cxx03`. Those headers are not part of the `libcxx` compilation, they are "installed" headers (distributed with libcxx to the end user).

Those headers are meant to be private, however I don't see how it can be included by any public header:

```
MINGW64 /d/msys64/clang64/include/c++
$ grep -r -F locale_guard.h
v1/__cxx03/module.modulemap:module cxx03_std_private_locale_locale_base_api_locale_guard         [system] { header "__locale_dir/locale_base_api/locale_guard.h" }
v1/__cxx03/__locale_dir/locale_base_api/bsd_locale_fallbacks.h:#include <__cxx03/__locale_dir/locale_base_api/locale_guard.h>
```

Beside, it uses C++11 extensions like `nullptr` and deleted function declarations.

https://github.com/llvm/llvm-project/pull/160479


More information about the libcxx-commits mailing list