[libcxx-commits] [PATCH] D124516: [libc++] Implement `std::expected` P0323R12

Jonathan Wakely via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 23 11:17:34 PST 2022


jwakely added inline comments.


================
Comment at: libcxx/include/__expected/expected.h:54-56
+#ifdef _LIBCPP_NO_EXCEPTIONS
+#  include <cstdlib> // for std::abort
+#endif
----------------
ldionne wrote:
> IMO the simplicity of always having the same set of transitive includes outweighs the additional `<cstdlib>` include, especially since I think most users will end up including that header anyway. I would just include this header unconditionally.
Another option would be to use `__builtin_abort()` which requires no header.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124516



More information about the libcxx-commits mailing list