xref: /llvm-project/libc/src/__support/CPP/README.md (revision b6bc9d72f65a5086f310f321e969d96e9a559e75)
1This directory contains partial re-implementations of some C++ standard library
2utilities. They are for use with internal LLVM libc code and tests.
3
4More utilities can be added on an as needed basis. There are certain rules to
5be followed for future changes and additions:
6
71. Only two kind of headers can be included: Other headers from this directory,
8and free standing C headers.
92. Free standing C headers are to be included as C headers and not as C++
10headers. That is, use `#include <stddef.h>` and not `#include <cstddef>`.
113. The utilities should be defined in the namespace `LIBC_NAMESPACE::cpp`. The
12higher level namespace should have a `__` prefix to avoid symbol name pollution
13when the utilities are used in implementation of public functions.
14