https://gcc.gnu.org/g:88a521cc3283ae6b6bccc7afefe4723399ddb975

commit r15-7865-g88a521cc3283ae6b6bccc7afefe4723399ddb975
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Mar 6 11:20:23 2025 +0000

    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 <ppa...@redhat.com>

Diff:
---
 libstdc++-v3/include/bits/ranges_util.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libstdc++-v3/include/bits/ranges_util.h 
b/libstdc++-v3/include/bits/ranges_util.h
index 51024ecbebe5..54e4f6261b05 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)

Reply via email to