blob: 29a89aa439b53de6eb24de6c929fdc4c3dbc4868 [file] [log] [blame]
Wyatt Heplerf9fb90f2020-09-30 18:59:33 -07001.. _module-pw_minimal_cpp_stdlib:
Wyatt Hepler0412a7d2020-01-28 16:27:32 -08002
3---------------------
4pw_minimal_cpp_stdlib
5---------------------
Armando Montanez0054a9b2020-03-13 13:06:24 -07006The ``pw_minimal_cpp_stdlib`` module provides an extremely limited
7implementation of the C++ Standard Library. This module falls far, far short of
8providing a complete C++ Standard Library and should only be used in dire
9situations where you happen to be compiling with C++17 but don't have a C++
10Standard Library available to you.
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080011
12The C++ Standard Library headers (e.g. ``<cstdint>`` and ``<type_traits>``) are
13defined in ``public/``. These files are symlinks to their implementations in
14``public/internal/``.
15
16.. tip::
17
18 You can automatically recreate the symlinks in ``public/`` by executing the
19 following Bash code from ``pw_minimal_cpp_stdlib/public/``.
20
21 .. code-block:: bash
22
23 for f in $(ls internal/); do ln -s internal/$f ${f%.h}; done
24
Wyatt Heplerd32daea2020-03-26 13:55:47 -070025Requirements
26============
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080027- C++17
28- gcc or clang
29- The C Standard Library