[libcxx-commits] [libcxx] 4b8bf6a - [libc++] Properly guard flat_map includes based on C++ version (#119227)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 11 13:53:36 PST 2024
Author: Louis Dionne
Date: 2024-12-11T16:53:33-05:00
New Revision: 4b8bf6aac890a1ab35ab3d807b49ab02181e49d9
URL: https://github.com/llvm/llvm-project/commit/4b8bf6aac890a1ab35ab3d807b49ab02181e49d9
DIFF: https://github.com/llvm/llvm-project/commit/4b8bf6aac890a1ab35ab3d807b49ab02181e49d9.diff
LOG: [libc++] Properly guard flat_map includes based on C++ version (#119227)
That's what we (try to) do consistently for all other umbrella headers.
As a drive-by, remove the <__assert> header which is not mandated
anymore.
Added:
Modified:
libcxx/include/flat_map
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
libcxx/test/libcxx/transitive_includes/cxx20.csv
Removed:
################################################################################
diff --git a/libcxx/include/flat_map b/libcxx/include/flat_map
index b99eebfa9fc538..1f2c204e2ef215 100644
--- a/libcxx/include/flat_map
+++ b/libcxx/include/flat_map
@@ -38,11 +38,15 @@ namespace std {
*/
#if 0
-#else // 0
-# include <__assert> // all public C++ headers provide the assertion handler
+#else // 0
# include <__config>
-# include <__flat_map/flat_map.h>
-# include <__flat_map/sorted_unique.h>
+
+# if _LIBCPP_STD_VER >= 23
+# include <__flat_map/flat_map.h>
+# include <__flat_map/sorted_unique.h>
+# endif
+
+// for feature-test macros
# include <version>
// standard required includes
diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv
index 72fccfd3649325..801f6cbf9060f8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -674,35 +674,13 @@ filesystem typeinfo
filesystem utility
filesystem variant
filesystem version
-flat_map atomic
-flat_map cctype
-flat_map climits
flat_map cmath
flat_map compare
-flat_map concepts
flat_map cstddef
flat_map cstdint
-flat_map cstdio
-flat_map cstdlib
-flat_map cstring
-flat_map ctime
-flat_map cwchar
-flat_map cwctype
-flat_map exception
flat_map initializer_list
-flat_map iosfwd
-flat_map iterator
flat_map limits
-flat_map memory
-flat_map new
-flat_map optional
-flat_map ratio
-flat_map stdexcept
-flat_map tuple
flat_map type_traits
-flat_map typeinfo
-flat_map utility
-flat_map variant
flat_map version
format algorithm
format array
diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv
index 72fccfd3649325..801f6cbf9060f8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -674,35 +674,13 @@ filesystem typeinfo
filesystem utility
filesystem variant
filesystem version
-flat_map atomic
-flat_map cctype
-flat_map climits
flat_map cmath
flat_map compare
-flat_map concepts
flat_map cstddef
flat_map cstdint
-flat_map cstdio
-flat_map cstdlib
-flat_map cstring
-flat_map ctime
-flat_map cwchar
-flat_map cwctype
-flat_map exception
flat_map initializer_list
-flat_map iosfwd
-flat_map iterator
flat_map limits
-flat_map memory
-flat_map new
-flat_map optional
-flat_map ratio
-flat_map stdexcept
-flat_map tuple
flat_map type_traits
-flat_map typeinfo
-flat_map utility
-flat_map variant
flat_map version
format algorithm
format array
diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv
index fd36dace19c76c..9146a7079ee1e9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -692,35 +692,13 @@ filesystem typeinfo
filesystem utility
filesystem variant
filesystem version
-flat_map atomic
-flat_map cctype
-flat_map climits
flat_map cmath
flat_map compare
-flat_map concepts
flat_map cstddef
flat_map cstdint
-flat_map cstdio
-flat_map cstdlib
-flat_map cstring
-flat_map ctime
-flat_map cwchar
-flat_map cwctype
-flat_map exception
flat_map initializer_list
-flat_map iosfwd
-flat_map iterator
flat_map limits
-flat_map memory
-flat_map new
-flat_map optional
-flat_map ratio
-flat_map stdexcept
-flat_map tuple
flat_map type_traits
-flat_map typeinfo
-flat_map utility
-flat_map variant
flat_map version
format algorithm
format array
diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv
index eaec25f81e5821..a3518f7f62ecb9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -701,35 +701,13 @@ filesystem utility
filesystem variant
filesystem vector
filesystem version
-flat_map atomic
-flat_map cctype
-flat_map climits
flat_map cmath
flat_map compare
-flat_map concepts
flat_map cstddef
flat_map cstdint
-flat_map cstdio
-flat_map cstdlib
-flat_map cstring
-flat_map ctime
-flat_map cwchar
-flat_map cwctype
-flat_map exception
flat_map initializer_list
-flat_map iosfwd
-flat_map iterator
flat_map limits
-flat_map memory
-flat_map new
-flat_map optional
-flat_map ratio
-flat_map stdexcept
-flat_map tuple
flat_map type_traits
-flat_map typeinfo
-flat_map utility
-flat_map variant
flat_map version
format algorithm
format array
diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv
index 89c28e49d6c9de..6de95139279471 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -697,35 +697,13 @@ filesystem utility
filesystem variant
filesystem vector
filesystem version
-flat_map atomic
-flat_map cctype
-flat_map climits
flat_map cmath
flat_map compare
-flat_map concepts
flat_map cstddef
flat_map cstdint
-flat_map cstdio
-flat_map cstdlib
-flat_map cstring
-flat_map ctime
-flat_map cwchar
-flat_map cwctype
-flat_map exception
flat_map initializer_list
-flat_map iosfwd
-flat_map iterator
flat_map limits
-flat_map memory
-flat_map new
-flat_map optional
-flat_map ratio
-flat_map stdexcept
-flat_map tuple
flat_map type_traits
-flat_map typeinfo
-flat_map utility
-flat_map variant
flat_map version
format algorithm
format array
More information about the libcxx-commits
mailing list