proxygen
folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item Struct Reference

Public Member Functions

constexpr make_item (std::size_t index_)
 
constexpr char alpha (std::size_t ord) const
 
constexpr char operator() (std::size_t offset) const
 

Public Attributes

std::size_t index {}
 

Detailed Description

template<std::size_t Base, std::size_t Size, bool Upper = false>
struct folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item

Definition at line 48 of file Format.cpp.

Constructor & Destructor Documentation

template<std::size_t Base, std::size_t Size, bool Upper = false>
constexpr folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item::make_item ( std::size_t  index_)
inlineexplicit

Definition at line 50 of file Format.cpp.

50 : index(index_) {} // gcc49

Member Function Documentation

template<std::size_t Base, std::size_t Size, bool Upper = false>
constexpr char folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item::alpha ( std::size_t  ord) const
inline

Definition at line 51 of file Format.cpp.

51  {
52  return ord < 10 ? '0' + ord : (Upper ? 'A' : 'a') + (ord - 10);
53  }
template<std::size_t Base, std::size_t Size, bool Upper = false>
constexpr char folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item::operator() ( std::size_t  offset) const
inline

Definition at line 54 of file Format.cpp.

References folly::constexpr_pow().

54  {
55  return alpha(index / constexpr_pow(Base, Size - offset - 1) % Base);
56  }
constexpr char alpha(std::size_t ord) const
Definition: Format.cpp:51
constexpr T constexpr_pow(T base, std::size_t exp)
AtomicCounter< T, DeterministicAtomic > Base

Member Data Documentation

template<std::size_t Base, std::size_t Size, bool Upper = false>
std::size_t folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item::index {}

Definition at line 49 of file Format.cpp.


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