Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75301e4

Browse files
committed
Fix C++20 compilation
1 parent 875c8fd commit 75301e4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

include/simdjson/dom/array.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ namespace std::ranges {
181181
template<>
182182
inline constexpr bool enable_view<simdjson::dom::array> = true;
183183
}
184-
185-
static_assert(std::ranges::view<simdjson::dom::array>);
186-
static_assert(std::ranges::sized_range<simdjson::dom::array>);
187-
#endif
184+
#endif // defined(__cpp_lib_ranges)
188185

189186
#endif // SIMDJSON_DOM_ARRAY_H

include/simdjson/inline/array.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,11 @@ inline std::ostream& operator<<(std::ostream& out, const simdjson_result<dom::ar
169169

170170
} // namespace simdjson
171171

172+
#include "simdjson/inline/element.h"
173+
174+
#if defined(__cpp_lib_ranges)
175+
static_assert(std::ranges::view<simdjson::dom::array>);
176+
static_assert(std::ranges::sized_range<simdjson::dom::array>);
177+
#endif // defined(__cpp_lib_ranges)
178+
172179
#endif // SIMDJSON_INLINE_ARRAY_H

0 commit comments

Comments
 (0)