LLVM  6.0.0svn
Static Public Member Functions | List of all members
llvm::format_provider< T, typename std::enable_if< detail::use_integral_formatter< T >::value >::type > Struct Template Reference

Implementation of format_provider<T> for integral arithmetic types. More...

#include "llvm/Support/FormatProviders.h"

Inheritance diagram for llvm::format_provider< T, typename std::enable_if< detail::use_integral_formatter< T >::value >::type >:
Inheritance graph
[legend]
Collaboration diagram for llvm::format_provider< T, typename std::enable_if< detail::use_integral_formatter< T >::value >::type >:
Collaboration graph
[legend]

Static Public Member Functions

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

Additional Inherited Members

- Static Protected Member Functions inherited from llvm::detail::HelperFunctions
static Optional< size_tparseNumericPrecision (StringRef Str)
 
static bool consumeHexStyle (StringRef &Str, HexPrintStyle &Style)
 
static size_t consumeNumHexDigits (StringRef &Str, HexPrintStyle Style, size_t Default)
 

Detailed Description

template<typename T>
struct llvm::format_provider< T, typename std::enable_if< detail::use_integral_formatter< T >::value >::type >

Implementation of format_provider<T> for integral arithmetic types.

The options string of an integral type has the grammar:

integer_options :: [style][digits] style :: digits :: <non-negative integer> 0-99


| style | Meaning | Example | Digits Meaning |

| | | Input | Output | |

| x- | Hex no prefix, lower | 42 | 2a | Minimum # digits | | X- | Hex no prefix, upper | 42 | 2A | Minimum # digits | | x+ / x | Hex + prefix, lower | 42 | 0x2a | Minimum # digits | | X+ / X | Hex + prefix, upper | 42 | 0x2A | Minimum # digits | | N / n | Digit grouped number | 123456 | 123,456 | Ignored | | D / d | Integer | 100000 | 100000 | Ignored |

| (empty) | Same as D / d | | | |

Definition at line 127 of file FormatProviders.h.

Member Function Documentation

◆ format()

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

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