[all-commits] [llvm/llvm-project] 1213d4: [libc++] Stabilize transitive includes for C++23 (...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Thu Aug 28 15:11:34 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1213d4ece0e8f391dfca2bd4a184197004442e70
https://github.com/llvm/llvm-project/commit/1213d4ece0e8f391dfca2bd4a184197004442e70
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2025-08-28 (Thu, 28 Aug 2025)
Changed paths:
M libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst
Log Message:
-----------
[libc++] Stabilize transitive includes for C++23 (#134143)
Our mechanism to retain transitive includes for backwards compatibility
was previously not taking into account C++23: this means that users on
C++23 would not get any protection against the removal of transitive
includes. This was fine when C++23 was still not used widely and it
allowed us to make build time improvements for such "bleeding edge"
users.
It also didn't take into account the larger topic of providing a
backwards compatible set of declarations, which is the real goal
of this mechanism.
However, now that C++23 is used pretty widely, we should start providing
transitive includes backwards compatibility for users of that language mode
too. This patch documents that requirement and mentions backwards compatibility
of the set of declarations as well, meaning we may also add internal headers in
the `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` blocks going forward.
There are no actual changes to the code since we haven't removed
transitive includes since the last release. However, starting now,
we should guard any removal of transitive includes behind
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23
instead of
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list