16#include <daw/daw_algorithm.h>
17#include <daw/daw_character_traits.h>
18#include <daw/daw_enable_requires.h>
28 struct writable_output_trait<T DAW_ENABLEIF_S(
29 std::is_base_of_v<
std::ostream, T> )> :
std::true_type {
31 template<
typename... StringViews>
32 static void write( std::ostream &os, StringViews
const &...svs ) {
33 static_assert(
sizeof...( StringViews ) > 0 );
34 DAW_CPP23_STATIC_LOCAL
constexpr auto writer =
39 o.write( sv.data( ),
static_cast<std::streamsize
>( sv.size( ) ) );
41 daw::json::ErrorReason::OutputError );
44 ( (void)writer( os, svs ), ... );
47 static void put( std::ostream &os,
char c ) {
50 daw::json::ErrorReason::OutputError );
#define daw_json_ensure(Bool,...)
Ensure that Bool is true. If false pass rest of args to daw_json_error.
DAW_REQUIRES(daw::json::json_details::is_container_opted_into_json_iostreams_v< Container >) std
An opt in ostream interface for containers of types that have JSON mappings.
#define DAW_JSON_CPP23_STATIC_CALL_OP
Customization point traits.
static void write(std::ostream &os, StringViews const &...svs)
static void put(std::ostream &os, char c)
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.