27#include <fmt/format.h>
58template <base::concepts::formattable Value>
72 void format(const Value& value,
fmt::memory_buffer& buffer)
const {
73 fmt::format_to(std::back_inserter(buffer),
"{0}", value);
84 fmt::memory_buffer& buffer)
const {
85 fmt::format_to(std::back_inserter(buffer),
"{0: >{1}}", value, width);
99template <concepts::formattable_real_scalar Value>
113 void format(const Value& value,
fmt::memory_buffer& buffer)
const {
115 std::back_inserter(buffer),
"{0:.{1}}", value, precision_);
126 fmt::memory_buffer& buffer)
const {
127 fmt::format_to(std::back_inserter(buffer),
"{0: >{1}.{2}}", value,
138 if (value <= 0) [[unlikely]] {
168template <concepts::formattable_iteration_parameter_value Value>
184 const
std::optional<Value>& value,
fmt::memory_buffer& buffer)
const {
188 buffer.append(null_string);
200 index_type width, fmt::memory_buffer& buffer)
const {
203 *value, width, buffer);
206 std::back_inserter(buffer),
"{0: >{1}}", null_string, width);
212 static constexpr std::string_view null_string{
"null"};
Class of exception on invalid arguments.
Definition of exceptions.
Definition of index_type type.
Namespace of fmt library.
std::ptrdiff_t index_type
Type of indices in this library.
constexpr index_type iteration_parameter_formatter_default_precision
Default precision of floating-point values in num_collect::logging::iterations::iteration_parameter_f...
Namespace of iteration logs.