libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE Namespace Reference

Namespaces

namespace  binary
 
namespace  binary_right_to_left
 An implementation of the binary-right-to-left method of exponentiation for raising a number to positive, integer power.
 
namespace  cache
 
namespace  cpu_timer
 Use the TSC timer to measure intervals.
 
namespace  dyn
 
namespace  enum_tags
 Construct enum-tag values from a sequence of chars, and extract from the tag-value the string that was encoded.
 
namespace  euclid
 
namespace  factoring
 
namespace  factory
 
namespace  fma
 The set of contained classes implements a DSEL that allows one to more naturally make use of the fma() operation using the natural mathematical operators of which std::fma() implements: * and + (or -).
 
namespace  hashers
 Various hashing functions.
 
namespace  heap
 
namespace  info
 All of this stuff is for high-quality error reporting.
 
namespace  intrusive
 
namespace  mpl
 
namespace  msm
 A meta (or finite)-state machine that can represent UML-style state tables in C++.
 
namespace  NTUtils
 
namespace  ppd
 Parallel Pixie Dust or PPD is the name of the thread library within libjmmcg.
 
namespace  private_
 
namespace  rapid_insert_lookup
 
namespace  singleton
 
namespace  socket
 
namespace  stack
 
namespace  stats_to_csv
 
namespace  syscall
 A wrapper for glibc or syscalls, etc. This function captures the return-code and if it is the specified failure-code, then according to the traits may capture any error information and throw it as an exception.
 

Classes

struct  a_zero_sized_class
 
class  AppBase
 
class  application
 Derive from this to assist with signal handling in one's executable. More...
 
class  automatic_scope
 Used to try to help ensure that an object can only be used in the current, automatic, scope. More...
 
class  ave_deviation_meter
 A class used to compute the arithmetic mean and mean-average deviation [1] of a series of events. More...
 
struct  back_batch
 An adaptor for collections that batches up to I items being both added to or removed from the collection, Colln. More...
 
class  back_batch< Colln, 0UL >
 Batch-sizes of zero aren't allowed. More...
 
struct  back_batch< Colln, 1UL >
 If the batch-size is one, collapse this to an empty wrapper of the collection_type. More...
 
class  basic_stack_string
 A class to provide a representation for a null-terminated character string that utilises a small-string optimisation. More...
 
class  binder0args
 
class  binder1st
 
class  binder2args
 
class  binder3args
 
class  binder4args
 
class  bitfield_map
 This container is an associative collection of types. The domain is a bit-map of the mapped_types that are selected in the range. More...
 
struct  checked_dynamic_cast
 
class  CmdLineParamsData
 
class  CmdLineProcessorBase
 
class  ConfigFile
 A specialization for helping to making use of configuration files. More...
 
class  const_mem_fun1_ref_t
 
class  const_mem_fun1_t
 
class  const_mem_fun2_ref_t
 
class  const_mem_fun_ref_t
 
class  copy_mem_fun1_ref_t
 
class  copy_mem_fun1_t
 
class  copy_mem_fun2_ref_t
 
class  copy_mem_fun_ref_t
 
class  crt_exception
 
class  csv_iterator
 
class  curl
 
struct  default_delete
 
class  exception
 
class  exit_codes
 A nice enum for the exit codes from main(). More...
 
struct  failure_code_mmap
 
class  file
 
struct  four_args
 
struct  free_ptr
 A trivial class to use global free() to deallocate the memory using an RAII-style wrapper. More...
 
struct  front_batch
 An adaptor for collections that batches up to I items being atomically removed from the collection, Colln. More...
 
class  front_batch< Colln, 0UL >
 Batch-sizes of zero aren't allowed. More...
 
struct  front_batch< Colln, 1UL >
 Batch-sizes of zero aren't allowed. More...
 
struct  hp_interval
 Measure a time interval via RAII. More...
 
class  hp_timer
 A class for providing timings in high-performance counter resolution. More...
 
class  hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl >
 
class  hp_timer< ppd::generic_traits::MS_Win32, Mdl_ >
 A class for providing timings in high-performance counter resolution. More...
 
struct  int128_t
 
struct  invert_if
 Invert the value V if the boolean A is false. More...
 
struct  invert_if< V, false >
 
class  latency_timestamps
 A simple class that is used to create a CSV-formatted file of timestamps, from which a histogram might be generated. More...
 
class  latency_timestamps_itf
 
class  line_iterator
 
class  Logger
 
class  lowerletter
 A simple class to turn a character into lowercase according to the current locale settings. More...
 
struct  max
 
class  mem_fun1_ref_t
 
class  mem_fun1_t
 
class  mem_fun_ref_t
 
struct  min
 
struct  modulus
 The result is the modulus of the value, V. More...
 
struct  narrow
 
struct  no_args
 
class  no_latency_timestamps
 A simple class that is used to create no timestamps. More...
 
class  non_addressable
 
class  non_allocatable
 
class  non_assignable
 Used to try to help ensure that an object cannot be copied. More...
 
class  non_copyable
 Used to try to help ensure that an object cannot be copied. More...
 
class  non_deleteable
 
class  non_newable
 Used to try to help ensure that an object can only be allocated on the stack. More...
 
struct  noop_dtor
 Another trivial class to make calling the dtor of an object into a functor, but actually does nothing. More...
 
struct  NullCrack
 
struct  one_arg
 
class  PeanoCurve
 
struct  placement_dtor
 Another trivial class to make calling the dtor of an object into a functor. More...
 
class  ptr_fun2_ref_t
 
class  ptr_fun2_t
 
class  ptr_fun3_ref_t
 
class  ptr_fun4_ref_t
 
class  ptr_fun_ref_t
 
class  ptr_fun_t
 
class  scoped_thread_settings
 
struct  shared_data
 
class  shared_mem
 A class to wrap POSIX (inter-process) shared-memory. More...
 
class  shared_ptr
 A shared pointer-type that has threading specified as a trait, and uses an intrusive count to save on calls to the memory allocator, which could cause excessive contention on the memory manager in a multi-threaded environment. More...
 
struct  sign
 The result is true if the value V is positive, otherwise false. More...
 
class  sp_counter_itf_type
 An optional interface for the intrusive sp_counter_type. More...
 
class  sp_counter_type
 The intrusive counter that an object must also inherit from for the shared_ptr class to work. More...
 
class  temp_file
 
struct  three_args
 
struct  two_args
 
struct  uint128_t
 
class  unique_ptr
 A unique pointer-type that has threading specified as a trait. More...
 
class  unordered_tuple
 A unordered container for a disparate list of types for which the keys form a perfect hash, computable at compile-time. More...
 
class  upperletter
 A simple class to turn a character into upper case according to the current locale settings. More...
 
struct  widen
 

Typedefs

typedef char tchar
 
typedef std::basic_string< tchartstring
 
typedef std::basic_stringstream< tchartstringstream
 
typedef std::basic_istringstream< tchartistringstream
 
typedef std::basic_ostringstream< tchartostringstream
 
typedef std::basic_istream< tchartistream
 
typedef std::basic_ostream< tchartostream
 
typedef basic_stack_string< 1, char > stack_string
 
typedef basic_stack_string< 1, wchar_t > wstack_string
 
typedef std::basic_fstream< tchartfstream
 
typedef std::basic_ifstream< tchartifstream
 
typedef std::basic_ofstream< tchartofstream
 

Enumerations

enum  log_level_type { log_none =0 , log_errors , log_warnings , log_info }
 

Functions

std::string make_filename (std::string &&root, char const *const mask="-%%%%%") noexcept(false)
 Return a string suitable for using to name a file. More...
 
std::string make_filename (char const *const root, char const *const mask) noexcept(false)
 
const tstring __fastcall dump_crt_errno (const unsigned long err=errno) noexcept(false)
 
std::wstring __fastcall StringToWString (const std::string &in)
 
std::string __fastcall WStringToString (const std::wstring &in)
 
tstring __fastcall WStringToTString (const std::wstring &in)
 
std::wstring __fastcall TStringToWString (const tstring &in)
 
tstring __fastcall StringToTString (const std::string &in) noexcept(true)
 
std::string __fastcall TStringToString (const tstring &in) noexcept(true)
 
constexpr std::uint32_t num_digits_in_base10 (std::uint64_t v) noexcept(true) __attribute__((pure))
 Returns the number of digits in the base 10 representation of an uint64_t. More...
 
std::uint32_t uint64ToBufferUnsafe (std::uint64_t v, char *const buffer, [[maybe_unused]] std::uint32_t sz) noexcept(true) __attribute__((pure))
 Copies the ASCII base 10 representation of v into the buffer and returns the number of bytes written. More...
 
std::uint64_t folly_ascii_to_int (char const *buffer, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Returns the ASCII base 10 representation in the buffer. More...
 
template<unsigned Base>
std::uint64_t ascii_to_int_baseline (char const *const buffer, std::size_t sz) noexcept(true) __attribute__((pure))
 Returns the ASCII base 10 representation in the buffer. More...
 
template<typename T >
tstring __fastcall tostring (const T &val)
 
template<std::size_t N>
tstring __fastcall tostring (const std::array< tstring::value_type, N > &val)
 
template<>
tstring __fastcall tostring< tstring > (const tstring &val)
 
template<typename A , typename Fmt >
tstring __fastcall tostring (const A &a, const Fmt &format)
 
template<std::size_t Sz>
constexpr std::size_t FORCE_INLINE tostring (std::uint64_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<std::uint8_t Base, std::size_t Sz>
constexpr std::size_t FORCE_INLINE tostring_zero_pad_right_justify (std::uint32_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<std::size_t Sz>
constexpr std::size_t FORCE_INLINE tostring (std::int64_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<class V >
std::size_t tostring (V v, char *const buff, std::size_t sz) noexcept(true)=delete
 
template<>
std::size_t tostring< int > (int v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<>
std::size_t tostring< unsigned int > (unsigned int v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<>
std::size_t tostring< long > (long v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
template<>
std::size_t tostring< unsigned long > (unsigned long v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
std::size_t tostring (std::uint32_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
std::size_t tostring (std::int64_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
std::size_t tostring (std::uint64_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure))
 Convert the input value to a string stored in the supplied buffer. More...
 
std::size_t tostring (double v, char *const buff, std::size_t sz) noexcept(true)
 Convert the input value to a string stored in the supplied buffer. More...
 
template<typename T >
void __fastcall fromstring (const tstring &str, T &val)
 
template<>
void __fastcall fromstring< tstring > (const tstring &str, tstring &val)
 
template<class V >
std::enable_if< std::is_integral< V >::value||std::is_floating_point< V >::value, V >::type fromstring (char const *const, std::uint32_t) noexcept(true) __attribute__((pure))=delete
 
template<>
int fromstring< int > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
unsigned int fromstring< unsigned int > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
long fromstring< long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
unsigned long fromstring< unsigned long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
long long fromstring< long long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
unsigned long long fromstring< unsigned long long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<>
double fromstring< double > (char const *const begin, std::uint32_t) noexcept(true) __attribute__((pure))
 Convert the decimal value contained in the input string into an integral value. More...
 
template<typename T >
void __fastcall delete_ptr (T *ptr)
 
tstring toupper (const tstring &l)
 Turn the input string into an uppercase variant according to the current locale settings. More...
 
tstring tolower (const tstring &u)
 Turn the input string into a lowercase variant according to the current locale settings. More...
 
template<class Iter >
Iter toupper (const Iter b, const Iter e, Iter o)
 Turn the input range into an uppercase variant according to the current locale settings. More...
 
template<class Iter >
Iter tolower (const Iter b, const Iter e, Iter o)
 Turn the input range into a lowercase variant according to the current locale settings. More...
 
template<unsigned int BuffN, class charT , class traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &os, basic_stack_string< BuffN, charT, traits > const &s) noexcept(false)
 
template<unsigned int BuffN, class charT , class traits >
std::basic_istream< charT, traits > & operator>> (std::basic_istream< charT, traits > &os, basic_stack_string< BuffN, charT, traits > &s) noexcept(false)
 
template<typename MeteredObjType >
tostream &__fastcall FORCE_INLINE operator<< (tostream &os, ave_deviation_meter< MeteredObjType > const &p) noexcept(false)
 
template<class MeteredObjType , class Fn >
ave_deviation_meter< MeteredObjType > estimate_average_deviation (typename ave_deviation_meter< MeteredObjType >::value_type const computations, Fn fn)
 An algorithm to estimate the average deviation returned after a functor is computed N times. More...
 
template<class MeteredObjType , class Fn >
std::pair< ave_deviation_meter< MeteredObjType >, boolcompute_average_deviation (double const target_deviation, typename ave_deviation_meter< MeteredObjType >::value_type const max_computations, Fn fn)
 An algorithm to compute the ave_deviation_meter of a functor when a specific average deviation is requested. More...
 
template<typename InputIterator , typename ValueType >
std::pair< bool, InputIterator > BestStringMatch (const InputIterator &matches_begin, const InputIterator &matches_end, const ValueType &str)
 
template<typename MeteredObjType >
tostream &__fastcall operator<< (tostream &os, ave_deviation_meter< MeteredObjType > const &p) noexcept(false)
 
template<class V >
constexpr V varadic_max (V v) noexcept(true)
 Work around the fact that there is no parameter-pack version of std::max(...). sigh C++ is great, no? More...
 
template<class V , class... Values>
constexpr V varadic_max (V v, Values... values) noexcept(true)
 
template<class V >
constexpr V varadic_min (V v) noexcept(true)
 
template<class V , class... Values>
constexpr V varadic_min (V v, Values... values) noexcept(true)
 
template<class Iter , class Compare >
void FORCE_INLINE bogo_sort (Iter first, Iter last, Compare comp)
 An implementation of the bogo-sort[1] algorithm, in STL-style. More...
 
template<class Iter1 , class Iter2 >
void FORCE_INLINE memcpy (Iter1 dest, Iter2 src, std::size_t n) noexcept(true)
 Equivalent to the memcpy operations. More...
 
template<>
void FORCE_INLINE memcpy< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true)
 
template<>
void FORCE_INLINE memcpy< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true)
 
template<class Iter1 , class Iter2 >
void FORCE_INLINE memmove (Iter1 dest, Iter2 src, std::size_t n) noexcept(true)
 Equivalent to the memmove operations. More...
 
template<>
void FORCE_INLINE memmove< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true)
 
template<>
void FORCE_INLINE memmove< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true)
 
template<class Iter , class V >
std::enable_if< std::is_same< typename std::iterator_traits< Iter >::value_type, V >::value >::type FORCE_INLINE memset (Iter dest, V i, std::size_t n) noexcept(true)
 Equivalent to the memset operations. More...
 
template<>
void FORCE_INLINE memset< char *, char > (char *dest, char i, std::size_t n) noexcept(true)
 
template<>
void FORCE_INLINE memset< wchar_t *, wchar_t > (wchar_t *dest, wchar_t i, std::size_t n) noexcept(true)
 
template<class Iter >
bool FORCE_INLINE memcmp (Iter src1, Iter src2, std::size_t n) noexcept(true)
 Equivalent to the std::memcmp() operations. More...
 
template<>
bool FORCE_INLINE memcmp< char const * > (char const *src1, char const *src2, std::size_t n) noexcept(true)
 
template<>
bool FORCE_INLINE memcmp< wchar_t const * > (wchar_t const *src1, wchar_t const *src2, std::size_t n) noexcept(true)
 
template<class Val , std::size_t SrcSz, std::size_t DestSz>
void FORCE_INLINE memcpy (Val const (&src)[SrcSz], Val(&dest)[DestSz]) noexcept(false)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE memcpy_opt (char const (&src)[SrcSz], char(&dest)[DestSz]) noexcept(true)
 Copy the source array to the destination (which may overlap), statically unrolled. More...
 
template<std::size_t FirstSz, std::size_t SecondSz>
constexpr bool FORCE_INLINE memcmp_opt (char const (&first)[FirstSz], char const (&second)[SecondSz]) noexcept(true)
 Compare the source array to the destination (which may overlap), statically unrolled. More...
 
template<char const needle, std::size_t FirstSz>
constexpr char const *FORCE_INLINE strchr_opt (char const (&haystack)[FirstSz]) noexcept(true) __attribute__((pure))
 Find the first occurrence of the character in the string. More...
 
template<long P, typename V >
 __attribute__ ((const)) const V __fastcall FORCE_INLINE pow(const V v)
 At compile-time, using the binary-right-to-left method, unroll the exponentiation of raising the value V to the integer power of P. More...
 
template<class BFSM , std::size_t BFSz = sizeof(typename std::underlying_type<typename boost::mpl::deref<typename boost::mpl::begin<BFSM>::type>::type::first::value_type>::type)>
class jmmcg::LIBJMMCG_VER_NAMESPACE::bitfield_map __attribute__ ((packed))
 
unsigned count_trailing_zeroes_compat (const uint128_t value) noexcept(true)
 
unsigned count_leading_zeroes_compat (const uint128_t value) noexcept(true)
 
template<std::size_t FirstSz, std::size_t SecondSz, class LessThan32BytesLong >
constexpr char const *FORCE_INLINE strstr_opt (char const (&haystack)[FirstSz], char const (&needle)[SecondSz]) noexcept(true)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE memcpy_opt (std::array< char, SrcSz > const &src, std::array< char, DestSz > &dest) noexcept(true)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE memcpy_opt (std::array< uint8_t, SrcSz > const &src, std::array< uint8_t, DestSz > &dest) noexcept(true)
 
template<std::size_t Sz>
bool memcmp (std::array< char, Sz > const &src1, std::array< char, Sz > const &src2) noexcept(true)
 
template<std::size_t Sz>
bool memcmp (std::array< uint8_t, Sz > const &src1, std::array< uint8_t, Sz > const &src2) noexcept(true)
 
template<std::size_t Sz>
bool operator== (std::array< char, Sz > const &src1, std::array< char, Sz > const &src2) noexcept(true)
 
template<std::size_t Sz>
bool operator== (std::array< uint8_t, Sz > const &src1, std::array< uint8_t, Sz > const &src2) noexcept(true)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr void memcpy_slow (char const (&src)[SrcSz], char(&dest)[DestSz]) noexcept(true)
 
template<class T , class V >
copy (V const &src) noexcept(true)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr std::array< char, DestSz > copy (std::array< char, SrcSz > const &src) noexcept(true)
 
template<std::size_t SrcSz, std::size_t DestSz>
constexpr std::array< uint8_t, DestSz > copy (std::array< uint8_t, SrcSz > const &src) noexcept(true)
 
 __attribute__ ((pure)) bool curl
 
std::string get_uuid_as_string () noexcept(false)
 
bool OutputDateTime (tostream &o, const time_t base_time=time(0), const tstring &fmt=_T("[%b %d %X %Z] "))
 
tostream &__fastcall operator<< (tostream &ss, const timespec &st)
 

Variables

const tchar *const log_level_strs []
 

Typedef Documentation

◆ stack_string

◆ tchar

Definition at line 62 of file ttypes.hpp.

◆ tfstream

typedef std::basic_fstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tfstream

Definition at line 34 of file file.hpp.

◆ tifstream

typedef std::basic_ifstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tifstream

Definition at line 35 of file file.hpp.

◆ tistream

typedef std::basic_istream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tistream

Definition at line 72 of file ttypes.hpp.

◆ tistringstream

typedef std::basic_istringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tistringstream

Definition at line 70 of file ttypes.hpp.

◆ tofstream

typedef std::basic_ofstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tofstream

Definition at line 36 of file file.hpp.

◆ tostream

typedef std::basic_ostream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tostream

Definition at line 73 of file ttypes.hpp.

◆ tostringstream

typedef std::basic_ostringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tostringstream

Definition at line 71 of file ttypes.hpp.

◆ tstring

typedef std::basic_string<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tstring

Definition at line 68 of file ttypes.hpp.

◆ tstringstream

typedef std::basic_stringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tstringstream

Definition at line 69 of file ttypes.hpp.

◆ wstack_string

Enumeration Type Documentation

◆ log_level_type

Enumerator
log_none 
log_errors 
log_warnings 
log_info 

Definition at line 27 of file logging.hpp.

Function Documentation

◆ __attribute__() [1/3]

template<long P, typename V >
jmmcg::LIBJMMCG_VER_NAMESPACE::__attribute__ ( (const)  ) const
inline

At compile-time, using the binary-right-to-left method, unroll the exponentiation of raising the value V to the integer power of P.

The runtime-algorithmic complexity of this function is O(M), where M is the algorithmic complexity of multiplication on the type V. The compile-time algorithmic complexity of this function is O(lg(power)+v(power)), where v(power) is the number of 1s in the binary representation of power.

Parameters
vThe value to be exponentiated.

Definition at line 239 of file integer_power.hpp.

◆ __attribute__() [2/3]

template<class BFSM , std::size_t BFSz = sizeof(typename std::underlying_type<typename boost::mpl::deref<typename boost::mpl::begin<BFSM>::type>::type::first::value_type>::type)>
struct jmmcg::LIBJMMCG_VER_NAMESPACE::uint128_t jmmcg::LIBJMMCG_VER_NAMESPACE::__attribute__ ( (packed)  )

◆ __attribute__() [3/3]

jmmcg::LIBJMMCG_VER_NAMESPACE::__attribute__ ( (pure)  )

Definition at line 65 of file curl.cpp.

◆ ascii_to_int_baseline()

template<unsigned Base>
std::uint64_t jmmcg::LIBJMMCG_VER_NAMESPACE::ascii_to_int_baseline ( char const *const  buffer,
std::size_t  sz 
)
inlinenoexcept

Returns the ASCII base 10 representation in the buffer.

Parameters
bufferThe ACSII base 10 representation of the natural number.
szThe length of the buffer.

Definition at line 288 of file ttypes.hpp.

◆ BestStringMatch()

template<typename InputIterator , typename ValueType >
std::pair<bool,InputIterator> jmmcg::LIBJMMCG_VER_NAMESPACE::BestStringMatch ( const InputIterator &  matches_begin,
const InputIterator &  matches_end,
const ValueType &  str 
)
inline

Definition at line 26 of file cmd_line_processing.hpp.

◆ bogo_sort()

template<class Iter , class Compare >
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::bogo_sort ( Iter  first,
Iter  last,
Compare  comp 
)
inline

An implementation of the bogo-sort[1] algorithm, in STL-style.

Apologies to all members of the C++ standards community for this perversion. This algorithm should never be used in any code, apart from as an example of easy it is to create an apparently innocuous algorithm which can have an exceptionally bad order.

I quote an edited excerpt of a discussion on the ACCU-General mailing list regarding this implementation: "The quest for perversity was clearly at odds with the quest for beauty. I think perversity wins out in this case. And yes, you're a very bad man. How about compounding your badness and just writing this little gem up for Overload or blogging it so that it becomes immortalised and searchable? >:-> Kevlin [Henney]"

Parameters
firstThe start of the input range.
lastThe end of the input range.
compThe comparator to be used to compare two values within the range.

Complexity: the truly excessive and exorbitant: O(N*N!+N*N)=O(N*N!), c.f. with O(nlog(n)) of std::sort().

[1] \see std::sort()

Definition at line 51 of file bogo_sort.hpp.

◆ compute_average_deviation()

template<class MeteredObjType , class Fn >
std::pair< ave_deviation_meter< MeteredObjType >, bool > jmmcg::LIBJMMCG_VER_NAMESPACE::compute_average_deviation ( double const  target_deviation,
typename ave_deviation_meter< MeteredObjType >::value_type const  max_computations,
Fn  fn 
)
inline

An algorithm to compute the ave_deviation_meter of a functor when a specific average deviation is requested.

Parameters
target_deviationThe maximum, target average deviation, as a percentage number, that should be achieved.
max_computationsThe maximum number of times the functor fn should be computed, to ensure termination.
fnThe functor to be computed. It should take no arguments and return ave_deviation_meter::value_type.
Returns
The computed ave_deviation_meter and a boolean that if set indicates that the target_deviation could not be achieved within max_computations attempts.

Definition at line 40 of file ave_deviation_meter_impl.hpp.

◆ copy() [1/3]

template<std::size_t SrcSz, std::size_t DestSz>
constexpr std::array<char, DestSz> jmmcg::LIBJMMCG_VER_NAMESPACE::copy ( std::array< char, SrcSz > const &  src)
inlineconstexprnoexcept

Definition at line 1011 of file memops_impl.hpp.

◆ copy() [2/3]

template<std::size_t SrcSz, std::size_t DestSz>
constexpr std::array<uint8_t, DestSz> jmmcg::LIBJMMCG_VER_NAMESPACE::copy ( std::array< uint8_t, SrcSz > const &  src)
inlineconstexprnoexcept

Definition at line 1024 of file memops_impl.hpp.

◆ copy() [3/3]

template<class T , class V >
T jmmcg::LIBJMMCG_VER_NAMESPACE::copy ( V const &  src)
inlinenoexcept

Definition at line 997 of file memops_impl.hpp.

◆ count_leading_zeroes_compat()

unsigned jmmcg::LIBJMMCG_VER_NAMESPACE::count_leading_zeroes_compat ( const uint128_t  value)
inlinenoexcept

Definition at line 109 of file int128_compatibility.hpp.

◆ count_trailing_zeroes_compat()

unsigned jmmcg::LIBJMMCG_VER_NAMESPACE::count_trailing_zeroes_compat ( const uint128_t  value)
inlinenoexcept

Definition at line 103 of file int128_compatibility.hpp.

◆ delete_ptr()

template<typename T >
void __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::delete_ptr ( T *  ptr)
inline

Definition at line 618 of file ttypes.hpp.

◆ dump_crt_errno()

NEVER_INLINE const tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::dump_crt_errno ( const unsigned long  err = errno)
inlinenoexcept

◆ estimate_average_deviation()

template<class MeteredObjType , class Fn >
ave_deviation_meter< MeteredObjType > jmmcg::LIBJMMCG_VER_NAMESPACE::estimate_average_deviation ( typename ave_deviation_meter< MeteredObjType >::value_type const  computations,
Fn  fn 
)
inline

An algorithm to estimate the average deviation returned after a functor is computed N times.

Parameters
computationsThe number of times the functor fn should be computed.
fnThe functor to be computed. It should take no arguments and return ave_deviation_meter::value_type.
Returns
The computed ave_deviation_meter.

Definition at line 30 of file ave_deviation_meter_impl.hpp.

◆ folly_ascii_to_int()

std::uint64_t jmmcg::LIBJMMCG_VER_NAMESPACE::folly_ascii_to_int ( char const *  buffer,
std::uint32_t  sz 
)
inlinenoexcept

Returns the ASCII base 10 representation in the buffer.

Parameters
bufferThe ACSII base 10 representation of the natural number.
szThe length of the buffer.

From Folly.

Definition at line 242 of file ttypes.hpp.

Referenced by test_folly_ascii_to_int::result().

◆ fromstring() [1/2]

template<class V >
std::enable_if<std::is_integral<V>::value || std::is_floating_point<V>::value, V>::type jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring ( char const * const  ,
std::uint32_t   
)
deletenoexcept

◆ fromstring() [2/2]

template<typename T >
void __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring ( const tstring str,
T &  val 
)
inline

Definition at line 499 of file ttypes.hpp.

◆ fromstring< double >()

template<>
double jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< double > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only, including a decimal point.
Returns
The scanned value.

Definition at line 583 of file ttypes.hpp.

◆ fromstring< int >()

template<>
int jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< int > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 517 of file ttypes.hpp.

◆ fromstring< long >()

template<>
long jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< long > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 539 of file ttypes.hpp.

◆ fromstring< long long >()

template<>
long long jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< long long > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 561 of file ttypes.hpp.

◆ fromstring< tstring >()

template<>
void __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< tstring > ( const tstring str,
tstring val 
)
inline

Definition at line 504 of file ttypes.hpp.

◆ fromstring< unsigned int >()

template<>
unsigned int jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< unsigned int > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 528 of file ttypes.hpp.

◆ fromstring< unsigned long >()

template<>
unsigned long jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< unsigned long > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 550 of file ttypes.hpp.

◆ fromstring< unsigned long long >()

template<>
unsigned long long jmmcg::LIBJMMCG_VER_NAMESPACE::fromstring< unsigned long long > ( char const *const  begin,
std::uint32_t  sz 
)
inlinenoexcept

Convert the decimal value contained in the input string into an integral value.

Parameters
buffThe input buffer that must contain the decimal value only.
Returns
The scanned value.

Definition at line 572 of file ttypes.hpp.

◆ get_uuid_as_string()

std::string jmmcg::LIBJMMCG_VER_NAMESPACE::get_uuid_as_string ( )
inlinenoexcept

Definition at line 33 of file uuid.hpp.

◆ make_filename() [1/2]

std::string jmmcg::LIBJMMCG_VER_NAMESPACE::make_filename ( char const *const  root,
char const *const  mask = "-%%%%%" 
)
noexcept

Definition at line 35 of file filename.cpp.

◆ make_filename() [2/2]

std::string jmmcg::LIBJMMCG_VER_NAMESPACE::make_filename ( std::string &&  root,
char const *const  mask = "-%%%%%" 
)
noexcept

Return a string suitable for using to name a file.

Parameters
rootThe string that shall be decorated to generate the resultant file name.
maskThe mask used to form the random string, where '' is a hexadecimal character.
Returns
The resultant filename. By default, this shall be of the form: "root-%%%%%.PID".

Definition at line 28 of file filename.cpp.

◆ memcmp() [1/3]

template<class Iter >
bool FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp ( Iter  src1,
Iter  src2,
std::size_t  n 
)
inlinenoexcept

Equivalent to the std::memcmp() operations.

Parameters
src1A random-access iterator into a contiguous array of memory.
src2A random-access iterator into a contiguous array of memory.
nThe number of elements to compare. Must comprise a valid range.
Returns
true iff the two sequences accessed via the iterators compare equal, element-by-element wise.
See also
std::memcmp(), std::wmemcmp()

Definition at line 623 of file memops_impl.hpp.

◆ memcmp() [2/3]

template<std::size_t Sz>
bool jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp ( std::array< char, Sz > const &  src1,
std::array< char, Sz > const &  src2 
)
inlinenoexcept

Definition at line 955 of file memops_impl.hpp.

◆ memcmp() [3/3]

template<std::size_t Sz>
bool jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp ( std::array< uint8_t, Sz > const &  src1,
std::array< uint8_t, Sz > const &  src2 
)
inlinenoexcept

Definition at line 962 of file memops_impl.hpp.

◆ memcmp< char const * >()

template<>
bool FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp< char const * > ( char const *  src1,
char const *  src2,
std::size_t  n 
)
inlinenoexcept

Definition at line 627 of file memops_impl.hpp.

◆ memcmp< wchar_t const * >()

template<>
bool FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp< wchar_t const * > ( wchar_t const *  src1,
wchar_t const *  src2,
std::size_t  n 
)
inlinenoexcept

Definition at line 632 of file memops_impl.hpp.

◆ memcmp_opt()

template<std::size_t FirstSz, std::size_t SecondSz>
constexpr bool FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp_opt ( char const (&)  first[FirstSz],
char const (&)  second[SecondSz] 
)
inlineconstexprnoexcept

Compare the source array to the destination (which may overlap), statically unrolled.

This method uses 512-bit, 256-bit, 128-bit, 64-bit, 32-bit, 16-bit then byte copies, unrolled to attempt to reduce the number of copy operations performed.

Algorithmic complexity: O(min(SrcSz, DestSz)/512)

Now ASAN reports mis-aligned accesses, [1], which could occur using MOV instructions [2] as in 64-bit mode alignment checking of ring 3 can be enabled. But on Intel & AMD mis-aligned access to memory-operands is not an issue in ring 3, so ubsan is conservative (obeying the Standard).

[1] [2] @param src The first C-style char-array. @param second The second C-style char-array. \return True if they are identical arrays, otherwise false. \see std::memcmp()

Definition at line 772 of file memops_impl.hpp.

◆ memcpy() [1/2]

template<class Iter1 , class Iter2 >
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy ( Iter1  dest,
Iter2  src,
std::size_t  n 
)
inlinenoexcept

Equivalent to the memcpy operations.

Parameters
destA random-access iterator into a contiguous array of memory, note that the locations will not be pre-initialised, i.e. placement-new will only be used.
srcA random-access iterator into a contiguous array of memory.
nThe number of elements to copy. Must comprise a valid range.
See also
std::memcpy(), std::wmemcpy()

Definition at line 578 of file memops_impl.hpp.

◆ memcpy() [2/2]

template<class Val , std::size_t SrcSz, std::size_t DestSz>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy ( Val const (&)  src[SrcSz],
Val(&)  dest[DestSz] 
)
noexcept

Definition at line 638 of file memops_impl.hpp.

◆ memcpy< char *, char const * >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy< char *, char const * > ( char *  dest,
char const *  src,
std::size_t  n 
)
inlinenoexcept

Definition at line 582 of file memops_impl.hpp.

◆ memcpy< wchar_t *, wchar_t const * >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy< wchar_t *, wchar_t const * > ( wchar_t *  dest,
wchar_t const *  src,
std::size_t  n 
)
inlinenoexcept

Definition at line 587 of file memops_impl.hpp.

◆ memcpy_opt() [1/3]

template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy_opt ( char const (&)  src[SrcSz],
char(&)  dest[DestSz] 
)
inlineconstexprnoexcept

Copy the source array to the destination (which may overlap), statically unrolled.

This method uses 512-bit, 256-bit, 128-bit, 64-bit, 32-bit, 16-bit then byte copies, unrolled to attempt to reduce the number of copy operations performed.

Algorithmic complexity: O(min(SrcSz, DestSz)/512)

Now ASAN reports mis-aligned accesses, [1], which could occur using MOV instructions [2] as in 64-bit mode alignment checking of ring 3 can be enabled. But on Intel & AMD mis-aligned access to memory-operands is not an issue in ring 3, so ubsan is conservative (obeying the Standard).

[1] [2] @param src The source C-style char-array. @param dest The destination C-style char-array. \see std::memcpy()

Definition at line 652 of file memops_impl.hpp.

◆ memcpy_opt() [2/3]

template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy_opt ( std::array< char, SrcSz > const &  src,
std::array< char, DestSz > &  dest 
)
inlineconstexprnoexcept

Definition at line 939 of file memops_impl.hpp.

◆ memcpy_opt() [3/3]

template<std::size_t SrcSz, std::size_t DestSz>
constexpr void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy_opt ( std::array< uint8_t, SrcSz > const &  src,
std::array< uint8_t, DestSz > &  dest 
)
inlineconstexprnoexcept

Definition at line 947 of file memops_impl.hpp.

◆ memcpy_slow()

template<std::size_t SrcSz, std::size_t DestSz>
constexpr void jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy_slow ( char const (&)  src[SrcSz],
char(&)  dest[DestSz] 
)
inlineconstexprnoexcept

Definition at line 986 of file memops_impl.hpp.

◆ memmove()

template<class Iter1 , class Iter2 >
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memmove ( Iter1  dest,
Iter2  src,
std::size_t  n 
)
inlinenoexcept

Equivalent to the memmove operations.

Parameters
destA random-access iterator into a contiguous array of memory, note that the locations will not be pre-initialised, i.e. placement-new will only be used.
srcA random-access iterator into a contiguous array of memory.
nThe number of elements to move. Must comprise a valid range.
See also
std::memmove(), std::wmemmove()

Definition at line 593 of file memops_impl.hpp.

◆ memmove< char *, char const * >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memmove< char *, char const * > ( char *  dest,
char const *  src,
std::size_t  n 
)
inlinenoexcept

Definition at line 597 of file memops_impl.hpp.

◆ memmove< wchar_t *, wchar_t const * >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memmove< wchar_t *, wchar_t const * > ( wchar_t *  dest,
wchar_t const *  src,
std::size_t  n 
)
inlinenoexcept

Definition at line 602 of file memops_impl.hpp.

◆ memset()

template<class Iter , class V >
std::enable_if< std::is_same< typename std::iterator_traits< Iter >::value_type, V >::value >::type FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memset ( Iter  dest,
i,
std::size_t  n 
)
inlinenoexcept

Equivalent to the memset operations.

Parameters
destA random-access iterator into a contiguous array of memory.
iThe value with which to initialise the elements in the range.
nThe number of elements to set. Must comprise a valid range.
See also
std::memset(), std::wmemset()

Definition at line 608 of file memops_impl.hpp.

◆ memset< char *, char >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memset< char *, char > ( char *  dest,
char  i,
std::size_t  n 
)
inlinenoexcept

Definition at line 612 of file memops_impl.hpp.

◆ memset< wchar_t *, wchar_t >()

template<>
void FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::memset< wchar_t *, wchar_t > ( wchar_t *  dest,
wchar_t  i,
std::size_t  n 
)
inlinenoexcept

Definition at line 617 of file memops_impl.hpp.

◆ num_digits_in_base10()

constexpr std::uint32_t jmmcg::LIBJMMCG_VER_NAMESPACE::num_digits_in_base10 ( std::uint64_t  v)
inlineconstexprnoexcept

Returns the number of digits in the base 10 representation of an uint64_t.

Useful for preallocating buffers and such. It is also used internally, see below. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.

From Folly.

Definition at line 144 of file ttypes.hpp.

Referenced by uint64ToBufferUnsafe().

◆ operator<<() [1/4]

template<unsigned int BuffN, class charT , class traits >
std::basic_ostream< charT, traits > & jmmcg::LIBJMMCG_VER_NAMESPACE::operator<< ( std::basic_ostream< charT, traits > &  os,
basic_stack_string< BuffN, charT, traits > const &  s 
)
inlinenoexcept

Definition at line 419 of file stack_string_impl.hpp.

◆ operator<<() [2/4]

template<typename MeteredObjType >
tostream& __fastcall FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::operator<< ( tostream os,
ave_deviation_meter< MeteredObjType > const &  p 
)
inlinenoexcept

Definition at line 22 of file ave_deviation_meter_impl.hpp.

◆ operator<<() [3/4]

template<typename MeteredObjType >
tostream& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::operator<< ( tostream os,
ave_deviation_meter< MeteredObjType > const &  p 
)
inlinenoexcept

Definition at line 22 of file ave_deviation_meter_impl.hpp.

◆ operator<<() [4/4]

tostream& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::operator<< ( tostream ss,
const timespec &  st 
)
inline

Definition at line 75 of file hp_timer.hpp.

◆ operator==() [1/2]

template<std::size_t Sz>
bool jmmcg::LIBJMMCG_VER_NAMESPACE::operator== ( std::array< char, Sz > const &  src1,
std::array< char, Sz > const &  src2 
)
inlinenoexcept

Definition at line 970 of file memops_impl.hpp.

◆ operator==() [2/2]

template<std::size_t Sz>
bool jmmcg::LIBJMMCG_VER_NAMESPACE::operator== ( std::array< uint8_t, Sz > const &  src1,
std::array< uint8_t, Sz > const &  src2 
)
inlinenoexcept

Definition at line 977 of file memops_impl.hpp.

◆ operator>>()

template<unsigned int BuffN, class charT , class traits >
std::basic_istream< charT, traits > & jmmcg::LIBJMMCG_VER_NAMESPACE::operator>> ( std::basic_istream< charT, traits > &  os,
basic_stack_string< BuffN, charT, traits > &  s 
)
inlinenoexcept

Definition at line 474 of file stack_string_impl.hpp.

◆ OutputDateTime()

bool jmmcg::LIBJMMCG_VER_NAMESPACE::OutputDateTime ( tostream o,
const time_t  base_time = time(0),
const tstring fmt = _T("[%b %d %X %Z] ") 
)
inline

Definition at line 41 of file logging.hpp.

◆ strchr_opt()

template<char const needle, std::size_t FirstSz>
constexpr char const *FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::strchr_opt ( char const (&)  haystack[FirstSz])
inlineconstexprnoexcept

◆ StringToTString()

tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::StringToTString ( const std::string &  in)
inlinenoexcept

Definition at line 110 of file unicode_conversions.hpp.

References StringToTString().

Referenced by StringToTString().

◆ StringToWString()

std::wstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::StringToWString ( const std::string &  in)
inline

Definition at line 57 of file unicode_conversions.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::widen::widen().

Referenced by TStringToWString().

◆ strstr_opt()

template<std::size_t FirstSz, std::size_t SecondSz, class LessThan32BytesLong >
constexpr char const* FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::strstr_opt ( char const (&)  haystack[FirstSz],
char const (&)  needle[SecondSz] 
)
inlineconstexprnoexcept

Definition at line 925 of file memops_impl.hpp.

◆ tolower() [1/2]

template<class Iter >
Iter jmmcg::LIBJMMCG_VER_NAMESPACE::tolower ( const Iter  b,
const Iter  e,
Iter  o 
)
inline

Turn the input range into a lowercase variant according to the current locale settings.

Definition at line 679 of file ttypes.hpp.

◆ tolower() [2/2]

tstring jmmcg::LIBJMMCG_VER_NAMESPACE::tolower ( const tstring u)
inline

Turn the input string into a lowercase variant according to the current locale settings.

Definition at line 664 of file ttypes.hpp.

◆ tostring() [1/10]

template<typename A , typename Fmt >
tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( const A a,
const Fmt &  format 
)
inline

Definition at line 330 of file ttypes.hpp.

◆ tostring() [2/10]

template<std::size_t N>
tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( const std::array< tstring::value_type, N > &  val)
inline

Definition at line 315 of file ttypes.hpp.

◆ tostring() [3/10]

template<typename T >
tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( const T &  val)
inline

Definition at line 309 of file ttypes.hpp.

◆ tostring() [4/10]

std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( double  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe floating-point, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal, floating-point number shall be converted.
szThe size of the input buffer.
Todo:
This is pretty slow. Write an optimised version for just decimal conversion.

Definition at line 493 of file ttypes.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert(), isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert_MIT_price(), and isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert_price().

◆ tostring() [5/10]

std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( std::int64_t  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 464 of file ttypes.hpp.

References uint64ToBufferUnsafe().

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert(), and folly_uint64ToBufferUnsafe::result().

◆ tostring() [6/10]

template<std::size_t Sz>
constexpr std::size_t FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( std::int64_t  v,
char(&)  buff[Sz] 
)
inlineconstexprnoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
SzThe size of the input buffer.

Definition at line 375 of file ttypes.hpp.

◆ tostring() [7/10]

std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( std::uint32_t  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 452 of file ttypes.hpp.

References uint64ToBufferUnsafe().

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert().

◆ tostring() [8/10]

std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( std::uint64_t  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 481 of file ttypes.hpp.

References uint64ToBufferUnsafe().

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert().

◆ tostring() [9/10]

template<std::size_t Sz>
constexpr std::size_t FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( std::uint64_t  v,
char(&)  buff[Sz] 
)
inlineconstexprnoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
SzThe size of the input buffer.

Definition at line 345 of file ttypes.hpp.

◆ tostring() [10/10]

template<class V >
std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring ( v,
char *const  buff,
std::size_t  sz 
)
inlinedeletenoexcept

◆ tostring< int >()

template<>
std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring< int > ( int  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 393 of file ttypes.hpp.

References uint64ToBufferUnsafe().

◆ tostring< long >()

template<>
std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring< long > ( long  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 422 of file ttypes.hpp.

References uint64ToBufferUnsafe().

◆ tostring< tstring >()

Definition at line 324 of file ttypes.hpp.

◆ tostring< unsigned int >()

template<>
std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring< unsigned int > ( unsigned int  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 410 of file ttypes.hpp.

References uint64ToBufferUnsafe().

◆ tostring< unsigned long >()

template<>
std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::tostring< unsigned long > ( unsigned long  v,
char *const  buff,
std::size_t  sz 
)
inlinenoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted.
szThe size of the input buffer.

Definition at line 439 of file ttypes.hpp.

References uint64ToBufferUnsafe().

◆ tostring_zero_pad_right_justify()

template<std::uint8_t Base, std::size_t Sz>
constexpr std::size_t FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::tostring_zero_pad_right_justify ( std::uint32_t  v,
char(&)  buff[Sz] 
)
inlineconstexprnoexcept

Convert the input value to a string stored in the supplied buffer.

Parameters
vThe integer, decimal input value.
buffA buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted, zero-padded, right-justified.
SzThe size of the input buffer.

Definition at line 357 of file ttypes.hpp.

◆ toupper() [1/2]

template<class Iter >
Iter jmmcg::LIBJMMCG_VER_NAMESPACE::toupper ( const Iter  b,
const Iter  e,
Iter  o 
)
inline

Turn the input range into an uppercase variant according to the current locale settings.

Definition at line 672 of file ttypes.hpp.

◆ toupper() [2/2]

tstring jmmcg::LIBJMMCG_VER_NAMESPACE::toupper ( const tstring l)
inline

Turn the input string into an uppercase variant according to the current locale settings.

Definition at line 656 of file ttypes.hpp.

◆ TStringToString()

std::string __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::TStringToString ( const tstring in)
inlinenoexcept

Definition at line 121 of file unicode_conversions.hpp.

References TStringToString().

Referenced by TStringToString().

◆ TStringToWString()

std::wstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::TStringToWString ( const tstring in)
inline

Definition at line 99 of file unicode_conversions.hpp.

References StringToWString(), and TStringToWString().

Referenced by TStringToWString().

◆ uint64ToBufferUnsafe()

std::uint32_t jmmcg::LIBJMMCG_VER_NAMESPACE::uint64ToBufferUnsafe ( std::uint64_t  v,
char *const  buffer,
[[maybe_unused] ] std::uint32_t  sz 
)
inlinenoexcept

Copies the ASCII base 10 representation of v into the buffer and returns the number of bytes written.

Assumes the buffer points to num_digits_in_base10(v) bytes of valid memory. Note that uint64 needs at most 20 bytes, uint32_t needs at most 10 bytes, uint16_t needs at most 5 bytes, and so on. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.

This primitive is unsafe because it makes the size assumption and does not write the terminal '\0'.

From Folly.

Definition at line 213 of file ttypes.hpp.

References num_digits_in_base10().

Referenced by tostring(), tostring< int >(), tostring< long >(), tostring< unsigned int >(), and tostring< unsigned long >().

◆ varadic_max() [1/2]

template<class V >
constexpr V jmmcg::LIBJMMCG_VER_NAMESPACE::varadic_max ( v)
inlineconstexprnoexcept

Work around the fact that there is no parameter-pack version of std::max(...). sigh C++ is great, no?

See Variadic functions: Variadic templates or initializer lists? – Revision 1.

Definition at line 43 of file max_min.hpp.

◆ varadic_max() [2/2]

template<class V , class... Values>
constexpr V jmmcg::LIBJMMCG_VER_NAMESPACE::varadic_max ( v,
Values...  values 
)
inlineconstexprnoexcept

Definition at line 48 of file max_min.hpp.

◆ varadic_min() [1/2]

template<class V >
constexpr V jmmcg::LIBJMMCG_VER_NAMESPACE::varadic_min ( v)
inlineconstexprnoexcept

Definition at line 54 of file max_min.hpp.

◆ varadic_min() [2/2]

template<class V , class... Values>
constexpr V jmmcg::LIBJMMCG_VER_NAMESPACE::varadic_min ( v,
Values...  values 
)
inlineconstexprnoexcept

Definition at line 59 of file max_min.hpp.

◆ WStringToString()

std::string __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::WStringToString ( const std::wstring &  in)
inline

Definition at line 70 of file unicode_conversions.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::narrow::narrow().

Referenced by WStringToTString().

◆ WStringToTString()

tstring __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::WStringToTString ( const std::wstring &  in)
inline

Definition at line 88 of file unicode_conversions.hpp.

References WStringToString(), and WStringToTString().

Referenced by WStringToTString().

Variable Documentation

◆ log_level_strs

const tchar* const jmmcg::LIBJMMCG_VER_NAMESPACE::log_level_strs[]
Initial value:
={
_T("none"),
_T("errors"),
_T("warnings"),
}
#define _T(str)
Definition: ttypes.hpp:63

Definition at line 34 of file logging.hpp.

Referenced by jmmcg::LIBJMMCG_VER_NAMESPACE::Logger< Except_ >::Log().