aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-03-06 11:20:23 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-03-06 16:14:59 +0000
commit88a521cc3283ae6b6bccc7afefe4723399ddb975 (patch)
treed3fbfa20589da7dfbcfcf8fa9b9026429bdba975
parent21c96f68f760ca303bb462134386ae201add4b44 (diff)
downloadgcc-88a521cc3283ae6b6bccc7afefe4723399ddb975.zip
gcc-88a521cc3283ae6b6bccc7afefe4723399ddb975.tar.gz
gcc-88a521cc3283ae6b6bccc7afefe4723399ddb975.tar.bz2
libstdc++: Ensure <bits/ranges_util.h> defines __pair_like
We need to include <bits/stl_pair.h> in C++23 and later, so that __pair_like_convertible_from can use __pair_like, and so that __is_tuple_like_v is declared before we define a partial specialization. libstdc++-v3/ChangeLog: * include/bits/ranges_util.h: Include <bits/stl_pair.h>. Reviewed-by: Patrick Palka <ppalka@redhat.com>
-rw-r--r--libstdc++-v3/include/bits/ranges_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/ranges_util.h b/libstdc++-v3/include/bits/ranges_util.h
index 51024ec..54e4f62 100644
--- a/libstdc++-v3/include/bits/ranges_util.h
+++ b/libstdc++-v3/include/bits/ranges_util.h
@@ -35,6 +35,9 @@
# include <bits/utility.h>
# include <bits/invoke.h>
# include <bits/cpp_type_traits.h> // __can_use_memchr_for_find
+#if __glibcxx_tuple_like // >= C++23
+# include <bits/stl_pair.h> // __pair_like, __is_tuple_like_v
+#endif
#ifdef __glibcxx_ranges
namespace std _GLIBCXX_VISIBILITY(default)