Skip to content

Commit cdfb181

Browse files
authored
Merge pull request #42263 from apple/egorzhdan/libstdcxx-old-std-fix
[cxx-interop] Fix test failures with older libstdc++
2 parents 3459000 + 6efd4c1 commit cdfb181

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

stdlib/public/Cxx/libstdcxx.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,30 @@
5050
#include <type_traits>
5151
#include <unordered_map>
5252
#include <unordered_set>
53+
54+
// C++17 and newer:
55+
56+
#if __has_include(<any>)
5357
#include <any>
58+
#endif
59+
#if __has_include(<charconv>)
5460
#include <charconv>
61+
#endif
62+
#if __has_include(<execution>)
5563
#include <execution>
64+
#endif
65+
#if __has_include(<filesystem>)
5666
#include <filesystem>
67+
#endif
68+
#if __has_include(<memory_resource>)
5769
#include <memory_resource>
70+
#endif
71+
#if __has_include(<optional>)
5872
#include <optional>
73+
#endif
74+
#if __has_include(<string_view>)
5975
#include <string_view>
76+
#endif
77+
#if __has_include(<variant>)
6078
#include <variant>
79+
#endif

0 commit comments

Comments
 (0)