[libcxx-commits] [PATCH] D91141: [9/N] [libcxx] Implement the stat function family on top of native windows APIs
Adrian McCarthy via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 18 09:59:59 PST 2020
amccarth added a comment.
LGTM as long as the run-time calculation of the default value for set_errno is legit.
================
Comment at: libcxx/src/filesystem/operations.cpp:409
+
+int set_errno(int e = GetLastError()) {
+ errno = static_cast<int>(__win_err_to_errc(e));
----------------
Whoa! I thought default argument values had to be compile-time constants. I've never seen this done before. Is this a newer C++ feature?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91141/new/
https://reviews.llvm.org/D91141
More information about the libcxx-commits
mailing list