STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
xstddef File Reference
#include <cstddef>
#include <cstdlib>
#include <initializer_list>
#include <xtr1common>

Classes

struct  _If< bool, _Ty1, _Ty2 >
 
struct  _If< true, _Ty1, _Ty2 >
 
struct  _Always_false< _Ty >
 
struct  plus< _Ty >
 
struct  minus< _Ty >
 
struct  multiplies< _Ty >
 
struct  equal_to< _Ty >
 
struct  less< _Ty >
 
struct  plus< void >
 
struct  minus< void >
 
struct  multiplies< void >
 
struct  equal_to< void >
 
struct  less< void >
 
struct  _Bitwise_hash< _Kty >
 
struct  hash< _Kty >
 
struct  hash< bool >
 
struct  hash< char >
 
struct  hash< signed char >
 
struct  hash< unsigned char >
 
struct  hash< char16_t >
 
struct  hash< char32_t >
 
struct  hash< short >
 
struct  hash< unsigned short >
 
struct  hash< int >
 
struct  hash< unsigned int >
 
struct  hash< long >
 
struct  hash< unsigned long >
 
struct  hash< long long >
 
struct  hash< unsigned long long >
 
struct  hash< float >
 
struct  hash< double >
 
struct  hash< long double >
 
struct  hash< _Ty * >
 
struct  _Arg_types< _Types >
 
struct  _Arg_types< _Ty1 >
 
struct  _Arg_types< _Ty1, _Ty2 >
 
struct  _Is_function< _Ty >
 
struct  is_function< _Ty >
 

Macros

#define _XSTDDEF_
 
#define _X_STD_BEGIN   _STD_BEGIN
 
#define _X_STD_END   _STD_END
 
#define _XSTD   _STD /* LEAVE SPACE */
 
#define _THROWS(x)
 
#define _TRY_BEGIN   { if (1) {
 
#define _CATCH(x)   } else if (0) {
 
#define _CATCH_ALL   } else if (0) {
 
#define _CATCH_END   } }
 
#define _RAISE(x)   _invoke_watson(0, 0, 0, 0, 0)
 
#define _RERAISE
 
#define _THROW0()
 
#define _THROW(x, y)   x(y)._Raise()
 
#define _THROW_NCEE(x, y)   x(y)._Raise()
 
#define _EMPTY_ARGUMENT   /* for empty macro argument */
 
#define _BITMASK(Enum, Ty)   typedef Enum Ty
 
#define _BITMASK_OPS(Ty)
 
#define _IOS_BITMASK(Enum, Ty)   typedef int Ty
 
#define _IOS_BITMASK_OPS(Ty)
 
#define _HASH_SEQ_DEFINED
 
#define _EMIT_CDECL(FUNC, OPT1, OPT2)   FUNC(__cdecl, OPT1, OPT2)
 
#define _EMIT_CLRCALL(FUNC, OPT1, OPT2)
 
#define _EMIT_FASTCALL(FUNC, OPT1, OPT2)
 
#define _EMIT_STDCALL(FUNC, OPT1, OPT2)
 
#define _EMIT_THISCALL(FUNC, OPT1, OPT2)
 
#define _EMIT_VECTORCALL(FUNC, OPT1, OPT2)
 
#define _NON_MEMBER_CALL(FUNC, CV_REF_OPT, WEIRD_OPT)
 
#define _NON_MEMBER_CALL_CV(FUNC, REF_OPT, WEIRD_OPT)
 
#define _NON_MEMBER_CALL_CV_REF(FUNC)
 
#define _MEMBER_CALL(FUNC, CV_OPT, REF_OPT)
 
#define _MEMBER_CALL_CV(FUNC, REF_OPT)
 
#define _MEMBER_CALL_CV_REF(FUNC)
 
#define _CLASS_DEFINE_CONST(CLASS)
 
#define _CLASS_DEFINE_CV(CLASS)
 
#define _CLASS_DEFINE_CV_REF(CLASS)
 
#define _COMMA   , /* for immediate commas in macro parameters */
 
#define _IS_FUNCTION(CALL_OPT, CV_REF_OPT, WEIRD_OPT)
 
#define _IS_FUNCTION_ELLIPSIS(CV_REF_OPT, WEIRD_OPT)
 

Functions

_STD_BEGIN size_t _Hash_seq (const unsigned char *_First, size_t _Count)
 
template<class _Ty >
constexpr _Ty * addressof (_Ty &_Val) _NOEXCEPT
 
template<class _Ptrty >
auto _Unfancy (_Ptrty _Ptr)
 
template<class _Ty >
_Ty * _Unfancy (_Ty *_Ptr)
 

Macro Definition Documentation

#define _BITMASK (   Enum,
  Ty 
)    typedef Enum Ty
#define _BITMASK_OPS (   Ty)
#define _CATCH (   x)    } else if (0) {
#define _CATCH_ALL   } else if (0) {
#define _CATCH_END   } }
#define _CLASS_DEFINE_CONST (   CLASS)
Value:
CLASS(const)
#define _EMPTY_ARGUMENT
Definition: xstddef:82
#define _CLASS_DEFINE_CV (   CLASS)
Value:
CLASS(const) \
CLASS(volatile) \
CLASS(const volatile)
#define _EMPTY_ARGUMENT
Definition: xstddef:82
#define _CLASS_DEFINE_CV_REF (   CLASS)
Value:
CLASS( , false) \
CLASS(const, true) \
CLASS(volatile, true) \
CLASS(const volatile, true) \
CLASS(&, true) \
CLASS(const &, true) \
CLASS(volatile &, true) \
CLASS(const volatile &, true) \
CLASS(&&, true) \
CLASS(const &&, true) \
CLASS(volatile &&, true) \
CLASS(const volatile &&, true)
#define _COMMA   , /* for immediate commas in macro parameters */
#define _EMIT_CDECL (   FUNC,
  OPT1,
  OPT2 
)    FUNC(__cdecl, OPT1, OPT2)
#define _EMIT_CLRCALL (   FUNC,
  OPT1,
  OPT2 
)
#define _EMIT_FASTCALL (   FUNC,
  OPT1,
  OPT2 
)
#define _EMIT_STDCALL (   FUNC,
  OPT1,
  OPT2 
)
#define _EMIT_THISCALL (   FUNC,
  OPT1,
  OPT2 
)
#define _EMIT_VECTORCALL (   FUNC,
  OPT1,
  OPT2 
)
#define _EMPTY_ARGUMENT   /* for empty macro argument */
#define _HASH_SEQ_DEFINED
#define _IOS_BITMASK (   Enum,
  Ty 
)    typedef int Ty
#define _IOS_BITMASK_OPS (   Ty)
#define _IS_FUNCTION (   CALL_OPT,
  CV_REF_OPT,
  WEIRD_OPT 
)
Value:
template<class _Ret, \
class... _Types> \
struct _Is_function<_Ret CALL_OPT (_Types...) CV_REF_OPT> \
: _Arg_types<_Types...> \
{ /* determine whether _Ty is a function */ \
typedef true_type _Bool_type; \
typedef _Ret result_type; \
static constexpr bool _Weird = WEIRD_OPT; \
};
Definition: xtr1common:22
Definition: xstddef:636
Definition: xstddef:656
#define _IS_FUNCTION_ELLIPSIS (   CV_REF_OPT,
  WEIRD_OPT 
)
Value:
template<class _Ret, \
class... _Types> \
struct _Is_function<_Ret (_Types..., ...) CV_REF_OPT> \
{ /* no calling conventions for ellipsis */ \
typedef true_type _Bool_type; \
typedef _Ret result_type; \
static constexpr bool _Weird = WEIRD_OPT; \
};
Definition: xtr1common:22
Definition: xstddef:656
#define _MEMBER_CALL (   FUNC,
  CV_OPT,
  REF_OPT 
)
Value:
_EMIT_CDECL(FUNC, CV_OPT, REF_OPT) \
_EMIT_CLRCALL(FUNC, CV_OPT, REF_OPT) \
_EMIT_FASTCALL(FUNC, CV_OPT, REF_OPT) \
_EMIT_STDCALL(FUNC, CV_OPT, REF_OPT) \
_EMIT_THISCALL(FUNC, CV_OPT, REF_OPT) \
_EMIT_VECTORCALL(FUNC, CV_OPT, REF_OPT)
#define _EMIT_THISCALL(FUNC, OPT1, OPT2)
Definition: xstddef:556
#define _EMIT_VECTORCALL(FUNC, OPT1, OPT2)
Definition: xstddef:565
#define _EMIT_STDCALL(FUNC, OPT1, OPT2)
Definition: xstddef:555
#define _EMIT_CDECL(FUNC, OPT1, OPT2)
Definition: xstddef:529
#define _EMIT_FASTCALL(FUNC, OPT1, OPT2)
Definition: xstddef:545
#define _EMIT_CLRCALL(FUNC, OPT1, OPT2)
Definition: xstddef:537
#define _MEMBER_CALL_CV (   FUNC,
  REF_OPT 
)
Value:
_MEMBER_CALL(FUNC, , REF_OPT) \
_MEMBER_CALL(FUNC, const, REF_OPT) \
_MEMBER_CALL(FUNC, volatile, REF_OPT) \
_MEMBER_CALL(FUNC, const volatile, REF_OPT)
#define _MEMBER_CALL(FUNC, CV_OPT, REF_OPT)
Definition: xstddef:586
#define _MEMBER_CALL_CV_REF (   FUNC)
Value:
#define _MEMBER_CALL_CV(FUNC, REF_OPT)
Definition: xstddef:594
#define _NON_MEMBER_CALL (   FUNC,
  CV_REF_OPT,
  WEIRD_OPT 
)
Value:
_EMIT_CDECL(FUNC, CV_REF_OPT, WEIRD_OPT) \
_EMIT_CLRCALL(FUNC, CV_REF_OPT, WEIRD_OPT) \
_EMIT_FASTCALL(FUNC, CV_REF_OPT, WEIRD_OPT) \
_EMIT_STDCALL(FUNC, CV_REF_OPT, WEIRD_OPT) \
_EMIT_VECTORCALL(FUNC, CV_REF_OPT, WEIRD_OPT)
#define _EMIT_VECTORCALL(FUNC, OPT1, OPT2)
Definition: xstddef:565
#define _EMIT_STDCALL(FUNC, OPT1, OPT2)
Definition: xstddef:555
#define _EMIT_CDECL(FUNC, OPT1, OPT2)
Definition: xstddef:529
#define _EMIT_FASTCALL(FUNC, OPT1, OPT2)
Definition: xstddef:545
#define _EMIT_CLRCALL(FUNC, OPT1, OPT2)
Definition: xstddef:537
#define _NON_MEMBER_CALL_CV (   FUNC,
  REF_OPT,
  WEIRD_OPT 
)
Value:
_NON_MEMBER_CALL(FUNC, REF_OPT, WEIRD_OPT) \
_NON_MEMBER_CALL(FUNC, const REF_OPT, true) \
_NON_MEMBER_CALL(FUNC, volatile REF_OPT, true) \
_NON_MEMBER_CALL(FUNC, const volatile REF_OPT, true)
#define _NON_MEMBER_CALL(FUNC, CV_REF_OPT, WEIRD_OPT)
Definition: xstddef:568
#define _NON_MEMBER_CALL_CV_REF (   FUNC)
Value:
_NON_MEMBER_CALL_CV(FUNC, , false) \
_NON_MEMBER_CALL_CV(FUNC, &, true) \
_NON_MEMBER_CALL_CV(FUNC, &&, true)
#define _NON_MEMBER_CALL_CV(FUNC, REF_OPT, WEIRD_OPT)
Definition: xstddef:575
#define _RAISE (   x)    _invoke_watson(0, 0, 0, 0, 0)
#define _RERAISE
#define _THROW (   x,
 
)    x(y)._Raise()
#define _THROW0 ( )
#define _THROW_NCEE (   x,
 
)    x(y)._Raise()
#define _THROWS (   x)
#define _TRY_BEGIN   { if (1) {
#define _X_STD_BEGIN   _STD_BEGIN
#define _X_STD_END   _STD_END
#define _XSTD   _STD /* LEAVE SPACE */
#define _XSTDDEF_

Function Documentation

_STD_BEGIN size_t _Hash_seq ( const unsigned char *  _First,
size_t  _Count 
)
inline
336  { // FNV-1a hash function for bytes in [_First, _First + _Count)
337  #if defined(_WIN64)
338  static_assert(sizeof(size_t) == 8, "This code is for 64-bit size_t.");
339  const size_t _FNV_offset_basis = 14695981039346656037ULL;
340  const size_t _FNV_prime = 1099511628211ULL;
341 
342  #else /* defined(_WIN64) */
343  static_assert(sizeof(size_t) == 4, "This code is for 32-bit size_t.");
344  const size_t _FNV_offset_basis = 2166136261U;
345  const size_t _FNV_prime = 16777619U;
346  #endif /* defined(_WIN64) */
347 
348  size_t _Val = _FNV_offset_basis;
349  for (size_t _Next = 0; _Next < _Count; ++_Next)
350  { // fold in another byte
351  _Val ^= (size_t)_First[_Next];
352  _Val *= _FNV_prime;
353  }
354  return (_Val);
355  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
unsigned int size_t
Definition: sourceannotations.h:19
template<class _Ptrty >
auto _Unfancy ( _Ptrty  _Ptr)
inline
733  { // converts from a fancy pointer to a plain pointer
734  return (_STD addressof(*_Ptr));
735  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
template<class _Ty >
_Ty* _Unfancy ( _Ty *  _Ptr)
inline
739  { // do nothing for plain pointers
740  return (_Ptr);
741  }
template<class _Ty >
constexpr _Ty* addressof ( _Ty &  _Val)
inline
724  { // return address of _Val
725  return (__builtin_addressof(_Val));
726  }
_In_ int _Val
Definition: vcruntime_string.h:62