Wyatt Hepler | 0412a7d | 2020-01-28 16:27:32 -0800 | [diff] [blame] | 1 | .. _chapter-pw-minimal-cpp-stdlib: |
| 2 | |
| 3 | .. default-domain:: cpp |
| 4 | |
| 5 | --------------------- |
| 6 | pw_minimal_cpp_stdlib |
| 7 | --------------------- |
| 8 | The pw_minimal_cpp_stdlib module provides an extremely limited implementation of |
| 9 | the C++ Standard Library. This module falls far, far short of providing a |
| 10 | complete C++ Standard Library and should only be used in dire situations where |
| 11 | you happen to be compiling with C++17 but don't have a C++ Standard Library |
| 12 | available to you. |
| 13 | |
| 14 | The C++ Standard Library headers (e.g. ``<cstdint>`` and ``<type_traits>``) are |
| 15 | defined in ``public/``. These files are symlinks to their implementations in |
| 16 | ``public/internal/``. |
| 17 | |
| 18 | .. tip:: |
| 19 | |
| 20 | You can automatically recreate the symlinks in ``public/`` by executing the |
| 21 | following Bash code from ``pw_minimal_cpp_stdlib/public/``. |
| 22 | |
| 23 | .. code-block:: bash |
| 24 | |
| 25 | for f in $(ls internal/); do ln -s internal/$f ${f%.h}; done |
| 26 | |
| 27 | Requirments |
| 28 | =========== |
| 29 | - C++17 |
| 30 | - gcc or clang |
| 31 | - The C Standard Library |