]> gcc.gnu.org Git - gcc.git/commitdiff
c++: xtreme-header modules tests cleanups
authorPatrick Palka <ppalka@redhat.com>
Tue, 20 Sep 2022 20:13:48 +0000 (16:13 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 20 Sep 2022 20:13:48 +0000 (16:13 -0400)
This adds some recently implemented C++20/23 library headers to the
xtreme-header tests as appropriate.  Also, it looks like we can safely
re-add <execution> and remove the NO_ASSOCIATED_LAMBDA workaround.

gcc/testsuite/ChangeLog:

* g++.dg/modules/xtreme-header-2.h: Include <execution>.
* g++.dg/modules/xtreme-header-6.h: Include implemented
C++20 library headers.
* g++.dg/modules/xtreme-header.h: Likewise.  Remove
NO_ASSOCIATED_LAMBDA workaround.  Include implemented C++23
library headers.

gcc/testsuite/g++.dg/modules/xtreme-header-2.h
gcc/testsuite/g++.dg/modules/xtreme-header-6.h
gcc/testsuite/g++.dg/modules/xtreme-header.h

index ded093e533c0beadba0f4aadfbd96a752c725839..dfe94aa6988e381ea0e2b05fda5004702d8e0f16 100644 (file)
@@ -1,8 +1,7 @@
 // Everything that transitively includes <ranges>
 
 #include <algorithm>
-// FIXME: PR 97549
-// #include <execution>
+#include <execution>
 #include <functional>
 #include <future>
 #include <memory>
index 85894b2b20a7988d85359cddc58c23c68f37a5c9..8d024b69bac4c8568c963654cdea719bd8f04b77 100644 (file)
@@ -1,22 +1,22 @@
 // C++20 headers
 #if __cplusplus > 201703
 #include <version>
+#include <barrier>
 #include <bit>
 #include <compare>
 #include <concepts>
 #if __cpp_coroutines
 #include <coroutine>
 #endif
+#include <latch>
 #include <numbers>
+#include <semaphore>
+#include <source_location>
 #include <span>
 #include <stop_token>
+#include <syncstream>
 #if 0
 // Unimplemented
-#include <barrier>
 #include <format>
-#include <latch>
-#include <semaphore>
-#include <source_location>
-#include <syncstream>
 #endif
 #endif
index 41302c780b5e02eed38bbc5d55478c82db6fb893..3147aaf00f44f719e328566518db41c183dd4518 100644 (file)
@@ -1,17 +1,8 @@
 // All the headers!
 
-#if __cplusplus > 201703L
-// FIXME: if we include everything, something goes wrong with location
-// information.  We used to not handle lambdas attached to global
-// vars, and this is a convienient flag to stop including everything.
-#define NO_ASSOCIATED_LAMBDA 1
-#endif
-
 // C++ 17 and below
 #if 1
-#if !NO_ASSOCIATED_LAMBDA
 #include <algorithm>
-#endif
 #include <any>
 #include <array>
 #include <atomic>
 #include <cwctype>
 #include <deque>
 #include <exception>
-#if !NO_ASSOCIATED_LAMBDA
-// FIXME: PR 97549
-//#include <execution>
-#endif
+#include <execution>
 #include <filesystem>
 #include <forward_list>
 #include <fstream>
-#if !NO_ASSOCIATED_LAMBDA
 #include <functional>
-#endif
-#if !NO_ASSOCIATED_LAMBDA
 #include <future>
-#endif
 #include <initializer_list>
 #include <iomanip>
 #include <ios>
 #include <list>
 #include <locale>
 #include <map>
-#if !NO_ASSOCIATED_LAMBDA
 #include <memory>
-#endif
-#if !NO_ASSOCIATED_LAMBDA
 #include <memory_resource>
-#endif
 #include <mutex>
 #include <new>
 #include <numeric>
 #include <queue>
 #include <random>
 #include <ratio>
-#if !NO_ASSOCIATED_LAMBDA
 #include <regex>
-#endif
-#if !NO_ASSOCIATED_LAMBDA
 #include <scoped_allocator>
-#endif
 #include <set>
 #include <shared_mutex>
 #include <sstream>
@@ -78,9 +54,7 @@
 #include <string>
 #include <string_view>
 #include <system_error>
-#if !NO_ASSOCIATED_LAMBDA
 #include <thread>
-#endif
 #include <tuple>
 #include <type_traits>
 #include <typeindex>
@@ -88,9 +62,7 @@
 #include <unordered_map>
 #include <unordered_set>
 #include <utility>
-#if !NO_ASSOCIATED_LAMBDA
 #include <valarray>
-#endif
 #include <variant>
 #include <vector>
 #endif
 #if __cplusplus > 201703
 #if 1
 #include <version>
+#include <barrier>
 #include <bit>
 #include <compare>
 #include <concepts>
 #if __cpp_coroutines
 #include <coroutine>
 #endif
-#if !NO_ASSOCIATED_LAMBDA
-#include <ranges>
-#endif
+#include <latch>
 #include <numbers>
+#include <ranges>
+#include <semaphore>
+#include <source_location>
 #include <span>
 #include <stop_token>
+#include <syncstream>
 #if 0
 // Unimplemented
-#include <barrier>
 #include <format>
-#include <latch>
-#include <semaphore>
-#include <source_location>
-#include <syncstream>
 #endif
 #endif
 #endif
+
+// C++23
+#if __cplusplus > 202002L
+#include <expected>
+#include <spanstream>
+#include <stacktrace>
+#if 0
+// Unimplemented
+#include <flat_map>
+#include <flat_set>
+#include <generator>
+#include <mdspan>
+#include <print>
+#endif
+#endif
This page took 0.071929 seconds and 5 git commands to generate.