[libc-commits] [PATCH] D150211: [libc] Rework cpp::optional
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue May 9 10:49:51 PDT 2023
mikhail.ramalho created this revision.
mikhail.ramalho added reviewers: sivachandra, michaelrj, jhuber6.
Herald added subscribers: libc-commits, asb, ecnelises, tschuett, s.egerton, PkmX, simoncook, arichardson.
Herald added projects: libc-project, All.
mikhail.ramalho requested review of this revision.
Herald added a subscriber: pcwang-thead.
This patch is a rewrite of cpp::optional to support non trivially
constructable, copyable, or movable types.
The motivation is to support cpp::optional<UInt<128>> (used by
UInt<T>::div), which is used when a platform does not support native
int128_t types (e.g., riscv32).
The code here is a trimmed down version of llvm::optional.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150211
Files:
libc/src/__support/CPP/optional.h
libc/src/__support/CPP/type_traits.h
libc/src/__support/UInt.h
libc/test/src/__support/CPP/optional_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150211.520758.patch
Type: text/x-patch
Size: 28845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230509/b5f5e6c6/attachment-0001.bin>
More information about the libc-commits
mailing list