LLVM  14.0.0git
Static Public Member Functions | List of all members
llvm::format_provider< T, std::enable_if_t< 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"

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< 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 200 of file FormatProviders.h.

Member Function Documentation

◆ format()

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

Definition at line 202 of file FormatProviders.h.

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


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