Rosetta
|
#include <core.h>
Public Types | |
using | char_type = Char |
using | iterator = typename basic_string_view< Char >::iterator |
Public Member Functions | |
constexpr | basic_format_parse_context (basic_string_view< Char > format_str, ErrorHandler eh={}, int next_arg_id=0) |
constexpr iterator | begin () const FMT_NOEXCEPT |
constexpr iterator | end () const FMT_NOEXCEPT |
FMT_CONSTEXPR void | advance_to (iterator it) |
FMT_CONSTEXPR int | next_arg_id () |
FMT_CONSTEXPR void | check_arg_id (int) |
FMT_CONSTEXPR void | check_arg_id (basic_string_view< Char >) |
FMT_CONSTEXPR void | on_error (const char *message) |
constexpr ErrorHandler | error_handler () const |
Private Attributes | |
basic_string_view< Char > | format_str_ |
int | next_arg_id_ |
Additional Inherited Members | |
![]() | |
constexpr | error_handler ()=default |
constexpr | error_handler (const error_handler &)=default |
FMT_NORETURN FMT_API void | on_error (const char *message) |
\rst Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing.
You can use one of the following type aliases for common character types:
+--------------------—+----------------------------------—+ | Type | Definition | +=======================+=====================================+ | format_parse_context | basic_format_parse_context<char> | +--------------------—+----------------------------------—+ | wformat_parse_context | basic_format_parse_context<wchar_t> | +--------------------—+----------------------------------—+ \endrst
using basic_format_parse_context< Char, ErrorHandler >::char_type = Char |
using basic_format_parse_context< Char, ErrorHandler >::iterator = typename basic_string_view<Char>::iterator |
|
inlineexplicitconstexpr |
|
inline |
Advances the begin iterator to it
.
References basic_format_parse_context< Char, ErrorHandler >::begin(), basic_format_parse_context< Char, ErrorHandler >::format_str_, and detail::to_unsigned().
Referenced by advance_to().
|
inlineconstexpr |
Returns an iterator to the beginning of the format string range being parsed.
References basic_format_parse_context< Char, ErrorHandler >::format_str_.
Referenced by advance_to(), basic_format_parse_context< Char, ErrorHandler >::advance_to(), formatter< std::chrono::duration< Rep, Period >, Char >::do_parse(), detail::format_handler< OutputIt, Char, Context >::on_format_specs(), and formatter< detail::bigint >::parse().
|
inline |
|
inline |
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
References basic_format_parse_context< Char, ErrorHandler >::next_arg_id_, and basic_format_parse_context< Char, ErrorHandler >::on_error().
Referenced by formatter< std::chrono::duration< Rep, Period >, Char >::spec_handler::make_arg_ref(), and detail::format_handler< OutputIt, Char, Context >::on_arg_id().
|
inlineconstexpr |
Returns an iterator past the end of the format string range being parsed.
References basic_format_parse_context< Char, ErrorHandler >::format_str_.
Referenced by formatter< std::chrono::duration< Rep, Period >, Char >::do_parse().
|
inlineconstexpr |
|
inline |
Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing.
References basic_format_parse_context< Char, ErrorHandler >::next_arg_id_, and basic_format_parse_context< Char, ErrorHandler >::on_error().
Referenced by formatter< std::chrono::duration< Rep, Period >, Char >::spec_handler::make_arg_ref(), and detail::format_handler< OutputIt, Char, Context >::on_arg_id().
|
inline |
|
private |
|
private |