moving SIMDJSON_SUPPORTS_EXTRACT

This commit is contained in:
Daniel Lemire
2024-10-09 20:54:24 -04:00
parent cf86e30b71
commit c6fbf5bf78
4 changed files with 17 additions and 5 deletions
@@ -45,7 +45,6 @@ BENCHMARK_TEMPLATE(partial_tweets, simdjson_ondemand)->UseManualTime();
#if SIMDJSON_SUPPORTS_EXTRACT
using namespace simdjson::ondemand;
struct simdjson_ondemand_extract {
+14
View File
@@ -50,4 +50,18 @@
#endif
#endif
#ifdef __has_include
#if __has_include(<version>)
#include <version>
#endif
#endif
#if defined(__cpp_concepts)
#define SIMDJSON_SUPPORTS_EXTRACT 1
#else
#define SIMDJSON_SUPPORTS_EXTRACT 0
#endif
#endif // SIMDJSON_COMPILER_CHECK_H
@@ -16,7 +16,7 @@ namespace SIMDJSON_IMPLEMENTATION {
namespace ondemand {
#ifdef SIMDJSON_SUPPORTS_EXTRACT
#if SIMDJSON_SUPPORTS_EXTRACT
#if SIMDJSON_REGULAR_VISUAL_STUDIO
+2 -3
View File
@@ -11,8 +11,7 @@ namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace ondemand {
#if defined(__cpp_concepts) && defined(__cpp_consteval)
#define SIMDJSON_SUPPORTS_EXTRACT 1
#if SIMDJSON_SUPPORTS_EXTRACT
template <typename T>
concept endpoint = std::is_invocable_r_v<error_code, T, simdjson_result<value>> &&
@@ -79,7 +78,7 @@ public:
/** @overload simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept; */
simdjson_inline simdjson_result<value> find_field(std::string_view key) && noexcept;
#ifdef SIMDJSON_SUPPORTS_EXTRACT
#if SIMDJSON_SUPPORTS_EXTRACT
/**
* Extract all the fields in one go
* Funcs are invocables that take a simdjson_result<value> as input.