LLVM 20.0.0git
|
Implementation of format_provider<T> for ranges. More...
#include "llvm/Support/FormatProviders.h"
Static Public Member Functions | |
static void | format (const llvm::iterator_range< IterT > &V, llvm::raw_ostream &Stream, StringRef Style) |
Implementation of format_provider<T> for ranges.
This will print an arbitrary range as a delimited sequence of items.
The options string of a range type has the grammar:
range_style ::= [separator] [element_style] separator ::= "$" delimeted_expr element_style ::= "@" delimeted_expr delimeted_expr ::= "[" expr "]" | "(" expr ")" | "<" expr ">" expr ::= <any string not containing delimeter>
where the separator expression is the string to insert between consecutive items in the range and the argument expression is the Style specification to be used when formatting the underlying type. The default separator if unspecified is ' ' (space). The syntax of the argument expression follows whatever grammar is dictated by the format provider or format adapter used to format the value type.
Note that attempting to format an iterator_range<T>
where no format provider can be found for T will result in a compile error.
Definition at line 362 of file FormatProviders.h.
|
inlinestatic |
Definition at line 403 of file FormatProviders.h.
References llvm::support::detail::build_format_adapter(), and End.