[libcxx-commits] [libcxx] [libc++] Fix <charconv> not exporting std::errc (PR #146268)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 29 07:39:33 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

`<charconv>` doesn't properly export `std::errc` with locales disabled, which causes the CI to fail. This fixed the modulemap to let `from_chars_result` export `std::errc`, like it's supposed to do.


---
Full diff: https://github.com/llvm/llvm-project/pull/146268.diff


1 Files Affected:

- (modified) libcxx/include/module.modulemap.in (+4-1) 


``````````diff
diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in
index f878e15d70b1a..b00a8ebd54623 100644
--- a/libcxx/include/module.modulemap.in
+++ b/libcxx/include/module.modulemap.in
@@ -934,7 +934,10 @@ module std [system] {
     module chars_format               { header "__charconv/chars_format.h" }
     module from_chars_floating_point  { header "__charconv/from_chars_floating_point.h" }
     module from_chars_integral        { header "__charconv/from_chars_integral.h" }
-    module from_chars_result          { header "__charconv/from_chars_result.h" }
+    module from_chars_result          {
+      header "__charconv/from_chars_result.h"
+      export std.system_error.errc
+    }
     module tables                     { header "__charconv/tables.h" }
     module to_chars                   { header "__charconv/to_chars.h" }
     module to_chars_base_10           { header "__charconv/to_chars_base_10.h" }

``````````

</details>


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


More information about the libcxx-commits mailing list