Joseph Huber b8e878da5c [libc] Rework 'cpp:optional' to support move construction
This patch replaces the existing `cpp::optional` type with a newer
version that has more features. This class is heavily inspired by the
old `llvm::Optional` class. Currently the limitations of this class is
that we only handle types with trivial constructors or operators.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149972
2023-05-05 13:45:22 -05:00
..
2023-04-07 11:58:38 +00:00
2022-10-22 20:54:14 +00:00

This directory contains partial re-implementations of some C++ standard library utilities. They are for use with internal LLVM libc code and tests.

More utilities can be added on an as needed basis. There are certain rules to be followed for future changes and additions:

  1. Only two kind of headers can be included: Other headers from this directory, and free standing C headers.
  2. Free standing C headers are to be included as C headers and not as C++ headers. That is, use #include <stddef.h> and not #include <cstddef>.
  3. The utilities should be defined in the namespace __llvm_libc::cpp. The higher level namespace should have a __ prefix to avoid symbol name pollution when the utilities are used in implementation of public functions.