[libcxx-commits] [libcxx] [libcxx] Handle windows system error code mapping in std::error_code. (PR #93101)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 5 11:48:20 PDT 2024
================
@@ -23,8 +24,80 @@
# include <android/api-level.h>
#endif
+#if defined(_LIBCPP_WIN32API)
+# include <windows.h>
+# include <winerror.h>
+#endif
+
_LIBCPP_BEGIN_NAMESPACE_STD
+#if defined(_LIBCPP_WIN32API)
+
+namespace {
+std::optional<errc> __win_err_to_errc(int err) {
----------------
ldionne wrote:
Can we use a `switch` instead?
https://github.com/llvm/llvm-project/pull/93101
More information about the libcxx-commits
mailing list