1 #ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H
3 #ifndef SIMDJSON_CONDITIONAL_INCLUDE
4 #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H
5 #include "simdjson/generic/base.h"
9 namespace SIMDJSON_IMPLEMENTATION {
77 #if SIMDJSON_EXCEPTIONS
84 simdjson_inline T&
value() & noexcept(
false);
91 simdjson_inline T&&
value() && noexcept(
false);
98 simdjson_inline T&&
take_value() && noexcept(
false);
105 simdjson_inline
operator T&&() && noexcept(
false);
The top level simdjson namespace, containing everything the library provides.
error_code
All possible errors returned by simdjson.
@ UNINITIALIZED
unknown error, or uninitialized document
The result of a simdjson operation that could fail.
simdjson_inline implementation_simdjson_result_base() noexcept=default
Create a new empty result with error = UNINITIALIZED.
simdjson_inline error_code error() const noexcept
The error.
error_code second
Users should never directly access 'first'.
simdjson_inline T & value() &noexcept(false)
Get the result value.
simdjson_inline const T & value_unsafe() const &noexcept
Get the result value.
simdjson_inline T && value() &&noexcept(false)
Take the result value (move it).
simdjson_inline error_code get(T &value) &&noexcept
Move the value to the provided variable.
simdjson_inline void tie(T &value, error_code &error) &&noexcept
Move the value and the error to the provided variables.
T first
users should never directly access first and second.
simdjson_inline T && take_value() &&noexcept(false)
Take the result value (move it).