DAW JSON Link
Loading...
Searching...
No Matches
daw_writable_output_fwd.h
Go to the documentation of this file.
1// Copyright (c) Darrell Wright
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
5//
6// Official repository: https://github.com/beached/daw_json_link
7//
8
9#pragma once
10
12
13#include <daw/daw_traits.h>
14
15namespace daw::json {
16 inline namespace DAW_JSON_VER {
17 namespace concepts {
24 template<typename, typename = void>
25 struct writable_output_trait : std::false_type {};
26
27 template<typename T>
28 inline constexpr bool is_writable_output_type_v =
30 } // namespace concepts
31
32 template<typename WritableOutput, typename... StringViews>
33 constexpr WritableOutput &write_output( WritableOutput &out,
34 StringViews const &...svs ) {
35 concepts::writable_output_trait<WritableOutput>::write( out, svs... );
36 return out;
37 }
38
39 template<typename WritableOutput, typename CharT>
40 constexpr WritableOutput &put_output( WritableOutput &out, CharT c ) {
41 concepts::writable_output_trait<WritableOutput>::put( out, c );
42 return out;
43 }
44 } // namespace DAW_JSON_VER
45} // namespace daw::json
constexpr WritableOutput & put_output(WritableOutput &out, CharT c)
constexpr WritableOutput & write_output(WritableOutput &out, StringViews const &...svs)
Customization point traits.
Writable output models write/putc methods to allow efficient output to buffers/FILE streams/ostreams/...
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition version.h:20