* [committed] libstdc++: Remove duplicate #include in <string_view>
@ 2021-07-13 11:11 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-07-13 11:11 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
When I added the new C++23 constructor I added a conditional include of
<bits/ranges_base.h>, which was already being included unconditionally.
This removes the unconditional include but changes the condition for the
other one, so it's used for C++20 as well.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/std/string_view: Only include <bits/ranges_base.h>
once, and only for C++20 and later.
Tested powerpc64le-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1215 bytes --]
commit bd1eb556b910fd4853ea83291e495d40adbcdf81
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jul 13 12:09:37 2021
libstdc++: Remove duplicate #include in <string_view>
When I added the new C++23 constructor I added a conditional include of
<bits/ranges_base.h>, which was already being included unconditionally.
This removes the unconditional include but changes the condition for the
other one, so it's used for C++20 as well.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/std/string_view: Only include <bits/ranges_base.h>
once, and only for C++20 and later.
diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view
index 33e2129383a..cfdcf28f026 100644
--- a/libstdc++-v3/include/std/string_view
+++ b/libstdc++-v3/include/std/string_view
@@ -41,11 +41,10 @@
#include <bits/char_traits.h>
#include <bits/functional_hash.h>
#include <bits/range_access.h>
-#include <bits/ranges_base.h>
#include <bits/ostream_insert.h>
#include <ext/numeric_traits.h>
-#if __cplusplus > 202002L
+#if __cplusplus >= 202002L
# include <bits/ranges_base.h>
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-13 11:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 11:11 [committed] libstdc++: Remove duplicate #include in <string_view> Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).