Public Types | Public Member Functions | Private Attributes | List of all members
internal::add_thousands_sep< Char > Class Template Reference

#include <format.h>

Public Types

enum  { size = 1 }
 
typedef Char char_type
 

Public Member Functions

 add_thousands_sep (basic_string_view< Char > sep)
 
void operator() (Char *&buffer)
 

Private Attributes

basic_string_view< Char > sep_
 
unsigned digit_index_
 

Detailed Description

template<typename Char>
class internal::add_thousands_sep< Char >

Definition at line 917 of file format.h.

Member Typedef Documentation

template<typename Char >
typedef Char internal::add_thousands_sep< Char >::char_type

Definition at line 925 of file format.h.

Member Enumeration Documentation

template<typename Char >
anonymous enum
Enumerator
size 

Definition at line 938 of file format.h.

Constructor & Destructor Documentation

template<typename Char >
internal::add_thousands_sep< Char >::add_thousands_sep ( basic_string_view< Char >  sep)
inlineexplicit

Definition at line 927 of file format.h.

928  : sep_(sep), digit_index_(0) {}
basic_string_view< Char > sep_
Definition: format.h:919

Member Function Documentation

template<typename Char >
void internal::add_thousands_sep< Char >::operator() ( Char *&  buffer)
inline

Definition at line 930 of file format.h.

930  {
931  if (++digit_index_ % 3 != 0)
932  return;
933  buffer -= sep_.size();
934  std::uninitialized_copy(sep_.data(), sep_.data() + sep_.size(),
936  }
T * make_checked(T *p, std::size_t)
Definition: format.h:389
basic_string_view< Char > sep_
Definition: format.h:919

Member Data Documentation

template<typename Char >
unsigned internal::add_thousands_sep< Char >::digit_index_
private

Definition at line 922 of file format.h.

template<typename Char >
basic_string_view<Char> internal::add_thousands_sep< Char >::sep_
private

Definition at line 919 of file format.h.


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