Only include bits/stl_algo.h for C++20.
authorEdward Smith-Rowland <3dw4rd@verizon.net>
Thu, 29 Nov 2018 15:17:17 +0000 (15:17 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Thu, 29 Nov 2018 15:17:17 +0000 (15:17 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/deque
libstdc++-v3/include/std/string
libstdc++-v3/include/std/vector

index 82a6e53..037325e 100644 (file)
@@ -1,5 +1,12 @@
 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.
        * include/experimental/deque: Make inline.
        * include/std/deque: Include bits/stl_algo.h.
index 764e1f1..25de200 100644 (file)
@@ -58,7 +58,9 @@
 #pragma GCC system_header
 
 #include <bits/stl_algobase.h>
-#include <bits/stl_algo.h> // For remove and remove_if
+#if __cplusplus > 201703L
+#  include <bits/stl_algo.h> // For remove and remove_if
+#endif // C++20
 #include <bits/allocator.h>
 #include <bits/stl_construct.h>
 #include <bits/stl_uninitialized.h>
index 33cb5e6..87b3183 100644 (file)
@@ -48,7 +48,9 @@
 #include <bits/stl_function.h> // For less
 #include <ext/numeric_traits.h>
 #include <bits/stl_algobase.h>
-#include <bits/stl_algo.h> // For remove and remove_if
+#if __cplusplus > 201703L
+#  include <bits/stl_algo.h> // For remove and remove_if
+#endif // C++20
 #include <bits/range_access.h>
 #include <bits/basic_string.h>
 #include <bits/basic_string.tcc>
index 720e0eb..ef04d75 100644 (file)
@@ -58,7 +58,9 @@
 #pragma GCC system_header
 
 #include <bits/stl_algobase.h>
-#include <bits/stl_algo.h> // For remove and remove_if
+#if __cplusplus > 201703L
+#  include <bits/stl_algo.h> // For remove and remove_if
+#endif // C++20
 #include <bits/allocator.h>
 #include <bits/stl_construct.h>
 #include <bits/stl_uninitialized.h>