template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
public:
- constexpr __formatter_pointer() { __parser_.__alignment_ = __format_spec::__alignment::__right; }
-
_LIBCPP_HIDE_FROM_ABI constexpr auto
parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_pointer);
return __formatter::__format_integer(reinterpret_cast<uintptr_t>(__ptr), __ctx, __specs);
}
- __format_spec::__parser<_CharT> __parser_;
+ __format_spec::__parser<_CharT> __parser_{.__alignment_ = __format_spec::__alignment::__right};
};
// [format.formatter.spec]/2.4
// formatters use the colon to mark the beginning of the
// underlying-format-spec. To avoid parsing ambiguities these formatter
// specializations prohibit the use of the colon as a fill character.
- uint8_t __allow_colon_in_fill_ : 1 {false};
+ uint8_t __use_range_fill_ : 1 {false};
};
// By not placing this constant in the formatter class it's not duplicated for
inline constexpr __fields __fields_pointer{.__type_ = true};
# if _LIBCPP_STD_VER >= 23
-inline constexpr __fields __fields_tuple{.__type_ = false, .__allow_colon_in_fill_ = true};
-inline constexpr __fields __fields_range{.__type_ = false, .__allow_colon_in_fill_ = true};
+inline constexpr __fields __fields_tuple{.__use_range_fill_ = true};
+inline constexpr __fields __fields_range{.__use_range_fill_ = true};
# endif
enum class _LIBCPP_ENUM_VIS __alignment : uint8_t {
if (__begin == __end)
return __begin;
- if (__parse_fill_align(__begin, __end, __fields.__allow_colon_in_fill_) && __begin == __end)
+ if (__parse_fill_align(__begin, __end, __fields.__use_range_fill_) && __begin == __end)
return __begin;
if (__fields.__sign_ && __parse_sign(__begin) && __begin == __end)