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

Implementation of format_provider<T> for floating point types. More...

#include "llvm/Support/FormatProviders.h"

Inheritance diagram for llvm::format_provider< T, typename std::enable_if< detail::use_double_formatter< T >::value >::type >:
Inheritance graph
[legend]
Collaboration diagram for llvm::format_provider< T, typename std::enable_if< detail::use_double_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_double_formatter< T >::value >::type >

Implementation of format_provider<T> for floating point types.

The options string of a floating point type has the format:

float_options :: [style][precision] style :: precision :: <non-negative integer> 0-99


| style | Meaning | Example |

| | | Input | Output |

| P / p | Percentage | 0.05 | 5.00% | | F / f | Fixed point | 1.0 | 1.00 | | E | Exponential with E | 100000 | 1.0E+05 | | e | Exponential with e | 100000 | 1.0e+05 |

| (empty) | Same as F / f | | |

The default precision is 6 for exponential (E / e) and 2 for everything else.

Definition at line 300 of file FormatProviders.h.

Member Function Documentation

◆ format()

template<typename T >
static void llvm::format_provider< T, typename std::enable_if< detail::use_double_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: