File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 55#include < set>
66
77// FIXME swift-ci linux tests do not support std::span
8- #if defined(__has_include) && __has_include(<span>)
8+ #ifndef __linux__
99#include < span>
10- #define SPAN_DEFINED 1
11- #else
12- #define SPAN_DEFINED 0
13- #endif
10+ #endif // __linux__
1411
1512static const size_t spanSize = 50000 ;
1613
1714using VectorOfU32 = std::vector<uint32_t >;
1815using SetOfU32 = std::set<uint32_t >;
19- #if SPAN_DEFINED
16+ #ifndef __linux__
2017using ArrayOfU32 = uint32_t [spanSize];
2118using SpanOfU32 = std::span<uint32_t >;
22- #endif
19+ #endif // __linux__
2320
2421static inline VectorOfU32 vec;
2522static inline SetOfU32 set;
26- #if SPAN_DEFINED
23+ #ifndef __linux__
2724static inline ArrayOfU32 array;
2825static inline SpanOfU32 span;
29- #endif
26+ #endif // __linux__
3027
3128inline void initVector (size_t size) {
3229 if (!vec.empty ()) {
@@ -47,7 +44,7 @@ inline void initSet(size_t size) {
4744 }
4845}
4946
50- #if SPAN_DEFINED
47+ #ifndef __linux__
5148inline void initSpan () {
5249 if (!span.empty ()) {
5350 return ;
@@ -57,7 +54,7 @@ inline void initSpan() {
5754 }
5855 span = SpanOfU32 (array);
5956}
60- #endif
57+ #endif // __linux__
6158
6259inline VectorOfU32 makeVector32 (size_t size) {
6360 initVector (size);
You can’t perform that action at this time.
0 commit comments