WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
parse_context< Char > Class Template Reference

Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. More...

#include <fmt/base.h>

Public Types

using char_type = Char
 
using iterator = const Char*
 

Public Member Functions

constexpr parse_context (basic_string_view< Char > fmt, int next_arg_id=0)
 
constexpr auto begin () const noexcept -> iterator
 Returns an iterator to the beginning of the format string range being parsed.
 
constexpr auto end () const noexcept -> iterator
 Returns an iterator past the end of the format string range being parsed.
 
FMT_CONSTEXPR void advance_to (iterator it)
 Advances the begin iterator to it.
 
FMT_CONSTEXPR auto next_arg_id () -> int
 Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing.
 
FMT_CONSTEXPR void check_arg_id (int id)
 Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
 
FMT_CONSTEXPR void check_arg_id (basic_string_view< Char >)
 
FMT_CONSTEXPR void check_dynamic_spec (int arg_id)
 

Detailed Description

template<typename Char = char>
class parse_context< Char >

Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing.

Member Typedef Documentation

◆ char_type

template<typename Char = char>
using parse_context< Char >::char_type = Char

◆ iterator

template<typename Char = char>
using parse_context< Char >::iterator = const Char*

Constructor & Destructor Documentation

◆ parse_context()

template<typename Char = char>
parse_context< Char >::parse_context ( basic_string_view< Char > fmt,
int next_arg_id = 0 )
inlineexplicitconstexpr

Member Function Documentation

◆ advance_to()

template<typename Char = char>
FMT_CONSTEXPR void parse_context< Char >::advance_to ( iterator it)
inline

Advances the begin iterator to it.

◆ begin()

template<typename Char = char>
auto parse_context< Char >::begin ( ) const -> iterator
inlineconstexprnoexcept

Returns an iterator to the beginning of the format string range being parsed.

◆ check_arg_id() [1/2]

template<typename Char = char>
FMT_CONSTEXPR void parse_context< Char >::check_arg_id ( basic_string_view< Char > )
inline

◆ check_arg_id() [2/2]

template<typename Char = char>
FMT_CONSTEXPR void parse_context< Char >::check_arg_id ( int id)
inline

Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.

◆ check_dynamic_spec()

template<typename Char >
FMT_CONSTEXPR void parse_context< Char >::check_dynamic_spec ( int arg_id)

◆ end()

template<typename Char = char>
auto parse_context< Char >::end ( ) const -> iterator
inlineconstexprnoexcept

Returns an iterator past the end of the format string range being parsed.

◆ next_arg_id()

template<typename Char = char>
FMT_CONSTEXPR auto parse_context< Char >::next_arg_id ( ) -> int
inline

Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing.


The documentation for this class was generated from the following file: