mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
moving SIMDJSON_SUPPORTS_EXTRACT
This commit is contained in:
@@ -45,7 +45,6 @@ BENCHMARK_TEMPLATE(partial_tweets, simdjson_ondemand)->UseManualTime();
|
||||
|
||||
|
||||
#if SIMDJSON_SUPPORTS_EXTRACT
|
||||
|
||||
using namespace simdjson::ondemand;
|
||||
|
||||
struct simdjson_ondemand_extract {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user