[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


================
@@ -582,7 +582,11 @@ struct ExceptionChecker {
     assert(ErrorIsImp(Err.code(), {expected_err}));
----------------
ldionne wrote:

Not attached to this file:

In the PR description, you mention:

> This allows code like:
> ```
> error_code(GetLastError(), system_category()) == errc::invalid_argument
> ```
> to work as expected -- as it does with MSVC STL.

I don't think I saw any test added to validate that this worked as intended. Did I miss that or should we add a test?

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


More information about the libcxx-commits mailing list