[libcxx-commits] [libcxx] [libcxxabi] [libc++] Introduce the notion of a minimum header version (PR #166074)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 17 07:43:51 PST 2025


================
@@ -10,8 +10,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-// These two symbols are part of the v1 ABI but not part of the >=v2 ABI.
-#if _LIBCPP_ABI_VERSION == 1
+#if _LIBCPP_AVAILABILITY_MINIMUM_HEADER_VERSION < 9
----------------
ldionne wrote:

Can you please add a comment explaining why this is version 9 and what's the reason for keeping the code around? And the same for other places where we hardcode a version.

In fact, we might want to introduce named macros for these versions that encode the semantics of these version checks and also give us an easy way to grep (and eventually remove) for specific versions. That's what we do for normal availability checks too.

https://github.com/llvm/llvm-project/pull/166074


More information about the libcxx-commits mailing list