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