DAW JSON Link
Namespaces | Macros | Functions | Variables
daw_json_assert.h File Reference
#include "../daw_json_exception.h"
#include "version.h"
#include <daw/daw_assume.h>
#include <daw/daw_attributes.h>
#include <daw/daw_check_exceptions.h>
#include <daw/daw_likely.h>
#include <daw/daw_string_view.h>
#include <algorithm>
#include <ciso646>
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <numeric>
#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

 daw
 
 daw::json
 
 daw::json::DAW_JSON_VER
 

Macros

#define daw_json_assert(Bool, ...)
 
#define daw_json_assert_weak(Bool, ...)
 

Functions

template<bool ShouldThrow = use_daw_json_exceptions_v>
DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (ErrorReason reason)
 
template<bool ShouldThrow = use_daw_json_exceptions_v, typename ParseState >
static DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (ErrorReason reason, ParseState const &location)
 
template<bool ShouldThrow = use_daw_json_exceptions_v>
static DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (json_details::missing_member reason)
 
template<bool ShouldThrow = use_daw_json_exceptions_v, typename ParseState >
static DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (json_details::missing_member reason, ParseState const &location)
 
template<bool ShouldThrow = use_daw_json_exceptions_v>
static DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (json_details::missing_token reason)
 
template<bool ShouldThrow = use_daw_json_exceptions_v, typename ParseState >
static DAW_ATTRIB_NOINLINE void daw::json::DAW_JSON_VER::daw_json_error (json_details::missing_token reason, ParseState const &location)
 

Variables

constexpr bool use_daw_json_exceptions_v = false
 

Macro Definition Documentation

◆ daw_json_assert

#define daw_json_assert (   Bool,
  ... 
)
Value:
do { \
if( DAW_UNLIKELY( not( Bool ) ) ) { \
daw_json_error( __VA_ARGS__ ); \
} \
} while( false )

◆ daw_json_assert_weak

#define daw_json_assert_weak (   Bool,
  ... 
)
Value:
do { \
if constexpr( not ParseState::is_unchecked_input ) { \
if( DAW_UNLIKELY( not( Bool ) ) ) { \
daw_json_error( __VA_ARGS__ ); \
} \
} \
} while( false )

Variable Documentation

◆ use_daw_json_exceptions_v

constexpr bool use_daw_json_exceptions_v = false
inlineconstexpr