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

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 19 06:54:33 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
----------------
philnik777 wrote:

I'm not really convinced a comment in every place makes a ton of sense. It's always the same reason: "The headers assumed that these symbols are available until LLVM X. Removing them would break programs compiled against these old headers". IMO a single place where we document the reason for using this macros would be better.

Re. greppability: I don't see how this isn't greppable. Just do `_LIBCPP_AVAILABILITY_MINIMUM_HEADER_VERSION < VERSION` and you'll find all the places.

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


More information about the libcxx-commits mailing list