di 0.1.0
Loading...
Searching...
No Matches
writer_println.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/format/prelude.h"
5
6namespace di::io {
7namespace detail {
8 template<concepts::Encoding Enc>
9 struct WriterPrintlnFunction {
10 template<Impl<Writer> Writer, typename... Args>
11 constexpr void operator()(Writer& writer, fmt::FormatStringImpl<Enc, Args...> format_string,
12 Args&&... args) const {
13 auto context = WriterFormatContext<Writer, Enc>(writer, format_string.encoding());
15 format_string, fmt::make_format_args<WriterFormatContext<Writer, Enc>>(args...), context);
16 (void) context.output('\n');
17 }
18 };
19}
20
21template<concepts::Encoding Enc>
22constexpr inline auto writer_println = detail::WriterPrintlnFunction<Enc> {};
23}
24
25namespace di {
27}
detail::FormatStringImpl< Enc, meta::TypeIdentity< Args >... > FormatStringImpl
Definition format_string_impl.h:70
constexpr auto make_format_args(Types &&... values)
Definition make_format_args.h:9
constexpr auto vformat_encoded_context
Definition vformat_encoded_context.h:61
Definition reader.h:7
meta::List< WriteSome, Flush, InteractiveDevice > Writer
Definition writer.h:85
constexpr auto writer_println
Definition writer_println.h:22
Definition any_storable.h:9