[libc-commits] [PATCH] D152270: [libc] Remove operator T from cpp::expected.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jun 6 10:56:53 PDT 2023


lntue added inline comments.


================
Comment at: libc/src/__support/File/dir.cpp:23
   __llvm_libc::AllocChecker ac;
-  Dir *dir = new (ac) Dir(fd);
+  Dir *dir = new (ac) Dir(fd.value());
   if (!ac)
----------------
sivachandra wrote:
> Is using `*fd` more idiomatic?
I'm not sure if it's more idiomatic, but most places in our code base are already using `.value()`.  Either usage is fine with me. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152270/new/

https://reviews.llvm.org/D152270



More information about the libc-commits mailing list