From: Edward Smith-Rowland <3dw4rd@verizon.net> Date: Thu, 29 Nov 2018 15:17:17 +0000 (+0000) Subject: Only include bits/stl_algo.h for C++20. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=355c62ce02d7d1a5fb7d28c829ee918df3983ad5;p=gcc.git Only include bits/stl_algo.h for C++20. 2018-11-29 Edward Smith-Rowland <3dw4rd@verizon.net> Only include bits/stl_algo.h for C++20. * include/std/deque: Only include bits/stl_algo.h for C++20. * include/std/string: Ditto. * include/std/vector: Ditto. From-SVN: r266624 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 82a6e532f90..037325ea554 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2018-11-29 Edward Smith-Rowland <3dw4rd@verizon.net> + + Only include bits/stl_algo.h for C++20. + * include/std/deque: Only include bits/stl_algo.h for C++20. + * include/std/string: Ditto. + * include/std/vector: Ditto. + 2018-11-29 Edward Smith-Rowland <3dw4rd@verizon.net> Fix erasure goofs. diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque index 764e1f17948..25de200cefd 100644 --- a/libstdc++-v3/include/std/deque +++ b/libstdc++-v3/include/std/deque @@ -58,7 +58,9 @@ #pragma GCC system_header #include -#include // For remove and remove_if +#if __cplusplus > 201703L +# include // For remove and remove_if +#endif // C++20 #include #include #include diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string index 33cb5e6738c..87b31839fcf 100644 --- a/libstdc++-v3/include/std/string +++ b/libstdc++-v3/include/std/string @@ -48,7 +48,9 @@ #include // For less #include #include -#include // For remove and remove_if +#if __cplusplus > 201703L +# include // For remove and remove_if +#endif // C++20 #include #include #include diff --git a/libstdc++-v3/include/std/vector b/libstdc++-v3/include/std/vector index 720e0eb9cc3..ef04d759d53 100644 --- a/libstdc++-v3/include/std/vector +++ b/libstdc++-v3/include/std/vector @@ -58,7 +58,9 @@ #pragma GCC system_header #include -#include // For remove and remove_if +#if __cplusplus > 201703L +# include // For remove and remove_if +#endif // C++20 #include #include #include