Skip to content

mp_units::utility::fmt_align

The alignment of a formatted value within its field width

Synopsis

Declared in <mp-units/utility/format.h>

enum class fmt_align : int8_t;

Description

parse_fill_align_width takes the alignment to use when the specification gives none. The formatter of quantity passes right:

constexpr auto parse(std::format_parse_context& ctx)
{
  return utility::parse_fill_align_width(ctx, ctx.begin(), ctx.end(), specs_, utility::fmt_align::right);
}

Members

NameDescription
none No alignment was given
left Aligned to the left, the < token
right Aligned to the right, the > token
center Centered, the ^ token
numeric Padded as left. parse_align has no token for it