LLVM 22.0.0git
llvm::format_provider< T, std::enable_if_t< support::detail::use_string_formatter< T >::value > > Struct Template Reference

Implementation of format_provider<T> for c-style strings and string objects such as std::string and llvm::StringRef. More...

#include "llvm/Support/FormatProviders.h"

Inheritance diagram for llvm::format_provider< T, std::enable_if_t< support::detail::use_string_formatter< T >::value > >:
[legend]

Static Public Member Functions

static void format (const T &V, llvm::raw_ostream &Stream, StringRef Style)

Detailed Description

template<typename T>
struct llvm::format_provider< T, std::enable_if_t< support::detail::use_string_formatter< T >::value > >

Implementation of format_provider<T> for c-style strings and string objects such as std::string and llvm::StringRef.

The options string of a string type has the grammar:

string_options :: [length]

where length is an optional integer specifying the maximum number of characters in the string to print. If length is omitted, the string is printed up to the null terminator.

Definition at line 194 of file FormatProviders.h.

Member Function Documentation

◆ format()

template<typename T>
void llvm::format_provider< T, std::enable_if_t< support::detail::use_string_formatter< T >::value > >::format ( const T & V,
llvm::raw_ostream & Stream,
StringRef Style )
inlinestatic

Definition at line 196 of file FormatProviders.h.

References assert(), N, llvm::StringRef::npos, llvm::StringRef::substr(), and T.


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