Iros
Loading...
Searching...
No Matches
formattable.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/format/concepts/format_context.h
"
4
#include "
di/format/format_parse_context.h
"
5
#include "
di/format/formatter.h
"
6
7
namespace
di::concepts
{
8
template
<
typename
T>
9
concept
Formattable
=
requires
(
format::ContextPlaceholder
& context,
10
format::FormatParseContext<container::string::Utf8Encoding>
parse_context, T&& value) {
11
{ (*
format::formatter<T>
(parse_context))(context, util::forward<T>(value)) } ->
SameAs<Result<void>
>;
12
};
13
}
14
15
namespace
di
{
16
using
concepts::Formattable
;
17
}
di::format::FormatParseContext
Definition
format_parse_context.h:14
di::concepts::Formattable
Definition
formattable.h:9
di::concepts::SameAs
Definition
core.h:114
format_context.h
format_parse_context.h
formatter.h
di::concepts
Definition
any_storable.h:9
di::format::formatter
constexpr auto formatter(FormatParseContext< Enc > &parse_context, bool debug=false)
Definition
formatter.h:27
di
Definition
zstring_parser.h:9
di::format::ContextPlaceholder
Definition
format_context.h:16
libs
di
include
di
format
concepts
formattable.h
Generated by
1.13.0