16 #include <daw/daw_algorithm.h>
17 #include <daw/daw_character_traits.h>
18 #include <daw/daw_string_view.h>
27 struct writable_output_trait<
std::FILE *> : std::true_type {
29 template<
typename... StringViews>
30 static inline void write( std::FILE *fp, StringViews
const &...svs ) {
31 static_assert(
sizeof...( StringViews ) > 0 );
32 constexpr
auto writer = []( std::FILE *f,
37 auto ret = std::fwrite( sv.data( ), 1, sv.size( ), f );
39 daw::json::ErrorReason::OutputError );
42 ( (void)writer( fp, svs ), ... );
45 static inline void put( std::FILE *f,
char c ) {
46 auto ret = std::fputc( c, f );
#define daw_json_ensure(Bool,...)
Ensure that Bool is true. If false pass rest of args to daw_json_error.
#define DAW_JSON_CPP23_STATIC_CALL_OP
This is in addition to the parse policy. Always do a full name match instead of sometimes relying on ...
Customization point traits.
static void write(std::FILE *fp, StringViews const &...svs)
static void put(std::FILE *f, char c)
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.