]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Include range_access.h from <optional> and <stacktrace>
authorTomasz Kamiński <tkaminsk@redhat.com>
Thu, 14 May 2026 12:47:03 +0000 (14:47 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Fri, 15 May 2026 17:25:47 +0000 (19:25 +0200)
This implements resolutions for LWG4131 and LWG3625 (also part of 4.8. section
of the P3016R6). As for any other issues LWG issue changes are applied as DR
for the oldest applicable standards:
* <optional> (LWG4131): C++26, since optional range support
* <stacktrace> (LWG3625): C++23, since introduction

libstdc++-v3/ChangeLog:

* include/std/optional [__cpp_lib_optional_range_support]:
Replace <bits/stl_iterator.h> include with <bits/range_access.h>.
* include/std/stacktrace: Likewise.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
libstdc++-v3/include/std/optional
libstdc++-v3/include/std/stacktrace

index e3c6ea209889204681bae6002563517f3c6d5230..8d6d049e8cccd96b1511f22c3c5bc7319f27ca45 100644 (file)
@@ -62,7 +62,7 @@
 #ifdef __cpp_lib_optional_range_support // C++ >= 26
 # include <bits/formatfwd.h>
 # include <bits/ranges_base.h>
-# include <bits/stl_iterator.h>
+# include <bits/range_access.h>
 #endif
 
 namespace std _GLIBCXX_VISIBILITY(default)
index 587a163e976671a75697756dc00a6d1c2f2450a4..79941d93b88f5ac69d19f7ac2f1e0fc64174cf40 100644 (file)
@@ -45,9 +45,9 @@
 #include <bits/memory_resource.h>
 #include <bits/stl_algobase.h>
 #include <bits/stl_algo.h>
-#include <bits/stl_iterator.h>
 #include <bits/stl_uninitialized.h>
 #include <bits/stl_tempbuf.h> // __get_temporary_buffer
+#include <bits/range_access.h>
 #include <ext/numeric_traits.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)