llvm-project/libcxx/docs/DesignDocs
Mark de Wever 8ff2d6af69 [libc++] Reduces the number of transitive includes.
This defines a new policy for removal of transitive includes.
The goal of the policy it to make it relatively easy to remove
headers when needed, but avoid breaking developers using and
vendors shipping libc++.

The method used is to guard transitive includes based on the
C++ language version. For the upcoming C++23 we can remove
headers when we want, but for other language versions we try
to keep it to a minimum.

In this code the transitive include of `<chrono>` is removed
since D128577 introduces a header cycle between `<format>`
and `<chrono>`. This cycle is indirectly required by the
Standard. Our cycle dependency tool basically is a grep based
tool, so it needs some hints to ignore cycles. With the input
of our transitive include tests we can create a better tool.
However that's out of the scope of this patch.

Note the flag `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` remains
unchanged. So users can still opt-out of transitives includes
entirely.

Reviewed By: #libc, ldionne, philnik

Differential Revision: https://reviews.llvm.org/D132284
2022-08-31 19:50:03 +02:00
..
ABIVersioning.rst [libc++] Update ABI docs. NFCI. 2021-06-29 12:39:23 -04:00
AtomicDesign.rst [libc++] Remove the old HTML documentation 2021-06-08 11:18:12 -04:00
CapturingConfigInfo.rst [libc++] Correct outdated documentation about __config_site 2022-03-23 13:42:04 -04:00
DebugMode.rst [libc++] Make the Debug mode a configuration-time only option 2022-06-07 16:33:53 -04:00
ExperimentalFeatures.rst [libc++] Take advantage of -fexperimental-library in libc++ 2022-07-22 08:33:39 -04:00
ExtendedCXX03Support.rst [libc++] Add auto to the list of required extensions in C++03 2022-05-23 20:48:53 +02:00
FeatureTestMacros.rst
FileTimeType.rst [libc++][gardening] Replace instances of `\x{AD}`. 2021-04-19 14:59:46 -07:00
HeaderRemovalPolicy.rst [libc++] Reduces the number of transitive includes. 2022-08-31 19:50:03 +02:00
NoexceptPolicy.rst [NFC][libc++][doc] Improves rst formatting. 2022-08-21 17:16:14 +02:00
ThreadingSupportAPI.rst
UniquePtrTrivialAbi.rst [libcxx][doc][nfc] Fixed typo in doc 2022-01-21 10:17:28 -05:00
UnspecifiedBehaviorRandomization.rst [libc++][docs] Change some words to use reST inline literals 2022-02-07 10:00:42 -08:00
VisibilityMacros.rst [libc++] Re-apply the use of ABI tags to provide per-TU insulation 2022-07-08 08:38:36 -04:00