#include <microfmt.hpp>
◆ const_iterator
◆ iterator
◆ size_type
◆ value_type
◆ format_parse_context()
| constexpr microfmt::format_parse_context::format_parse_context |
( |
microfmt::string_view spec RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS | ) |
|
|
inlineexplicitconstexprnoexcept |
◆ advance_to()
| RELOCO_BEGIN_UNSAFE_CODE constexpr void microfmt::format_parse_context::advance_to |
( |
const_iterator |
it | ) |
|
|
inlineconstexprnoexcept |
◆ back()
| constexpr char microfmt::format_parse_context::back |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ begin()
| constexpr const_iterator microfmt::format_parse_context::begin |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ cbegin()
| constexpr const_iterator microfmt::format_parse_context::cbegin |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ cend()
| constexpr const_iterator microfmt::format_parse_context::cend |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ consume()
| constexpr char microfmt::format_parse_context::consume |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ consume_debug_flag()
| constexpr bool microfmt::format_parse_context::consume_debug_flag |
( |
| ) |
|
|
inlineconstexprnoexcept |
Detects and consumes a leading ? – Rust's {:?} Debug flag, as opposed to {}'s Display – returning true (and removing it from the remaining spec) if present, false otherwise.
A shared convention, not a hardcoded type list: any formatter<T> that has a meaningfully different "debug" representation (e.g. microfmt::string_view/char, quoting and escaping their content) calls this from parse() and remembers the result. Types whose Debug and Display forms coincide (integers, floats, bool, ..., matching Rust's own derived Debug for these) need not call it at all – an unconsumed ? is simply never recognized by their own flag/width parsing, which is indistinguishable from Display.
Defining MICROFMT_DISABLE_DEBUG_FLAG removes every call site of this function from microfmt::formatter<char>/formatter<microfmt::string_view>/ formatter<std::string_view>/detail::const_char_like at the preprocessor level (see docs/porting.md), so a literal {:?} in a format string simply behaves like {} for those types too, in exchange for dropping the escaping/quoting code paths from the binary on targets that never need textual {:?} support. reloco::Debug<T>/ microfmt::as_debug() are entirely unaffected either way: they never go through spec/this function at all (see as_debug()'s own doc comment below).
◆ empty()
| constexpr bool microfmt::format_parse_context::empty |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ end()
| constexpr const_iterator microfmt::format_parse_context::end |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ find()
| constexpr size_type microfmt::format_parse_context::find |
( |
char |
ch, |
|
|
size_type |
pos = 0 |
|
) |
| const |
|
inlineconstexprnoexcept |
◆ front()
| constexpr char microfmt::format_parse_context::front |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator[]()
| RELOCO_CHECKED constexpr char microfmt::format_parse_context::operator[] |
( |
size_type |
idx | ) |
const |
|
inlineconstexprnoexcept |
◆ remove_prefix()
◆ size()
| constexpr size_type microfmt::format_parse_context::size |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ spec()
| constexpr microfmt::string_view microfmt::format_parse_context::spec |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ starts_with() [1/2]
| constexpr bool microfmt::format_parse_context::starts_with |
( |
char |
ch | ) |
const |
|
inlineconstexprnoexcept |
◆ starts_with() [2/2]
| constexpr bool microfmt::format_parse_context::starts_with |
( |
microfmt::string_view |
prefix | ) |
const |
|
inlineconstexprnoexcept |
◆ substr()
| constexpr microfmt::string_view microfmt::format_parse_context::substr |
( |
size_type |
pos = 0, |
|
|
size_type |
count = microfmt::string_view::npos |
|
) |
| const |
|
inlineconstexprnoexcept |
The documentation for this class was generated from the following file: