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 5
5
#include < set>
6
6
7
7
// FIXME swift-ci linux tests do not support std::span
8
- #if defined(__has_include) && __has_include(<span>)
8
+ #ifndef __linux__
9
9
#include < span>
10
- #define SPAN_DEFINED 1
11
- #else
12
- #define SPAN_DEFINED 0
13
- #endif
10
+ #endif // __linux__
14
11
15
12
static const size_t spanSize = 50000 ;
16
13
17
14
using VectorOfU32 = std::vector<uint32_t >;
18
15
using SetOfU32 = std::set<uint32_t >;
19
- #if SPAN_DEFINED
16
+ #ifndef __linux__
20
17
using ArrayOfU32 = uint32_t [spanSize];
21
18
using SpanOfU32 = std::span<uint32_t >;
22
- #endif
19
+ #endif // __linux__
23
20
24
21
static inline VectorOfU32 vec;
25
22
static inline SetOfU32 set;
26
- #if SPAN_DEFINED
23
+ #ifndef __linux__
27
24
static inline ArrayOfU32 array;
28
25
static inline SpanOfU32 span;
29
- #endif
26
+ #endif // __linux__
30
27
31
28
inline void initVector (size_t size) {
32
29
if (!vec.empty ()) {
@@ -47,7 +44,7 @@ inline void initSet(size_t size) {
47
44
}
48
45
}
49
46
50
- #if SPAN_DEFINED
47
+ #ifndef __linux__
51
48
inline void initSpan () {
52
49
if (!span.empty ()) {
53
50
return ;
@@ -57,7 +54,7 @@ inline void initSpan() {
57
54
}
58
55
span = SpanOfU32 (array);
59
56
}
60
- #endif
57
+ #endif // __linux__
61
58
62
59
inline VectorOfU32 makeVector32 (size_t size) {
63
60
initVector (size);
You can’t perform that action at this time.
0 commit comments