STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Static Public Member Functions | List of all members
char_traits< char > Struct Template Reference

Public Types

typedef char _Elem
 
typedef _Elem char_type
 
typedef int int_type
 
typedef streampos pos_type
 
typedef streamoff off_type
 
typedef _Mbstatet state_type
 

Static Public Member Functions

static int __CLRCALL_OR_CDECL compare (const _Elem *_First1, const _Elem *_First2, size_t _Count)
 
static size_t __CLRCALL_OR_CDECL length (const _Elem *_First)
 
static _Elem *__CLRCALL_OR_CDECL copy (_Elem *_First1, const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL _Copy_s (_Out_writes_(_Size_in_bytes) _Elem *_First1, size_t _Size_in_bytes, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static const _Elem *__CLRCALL_OR_CDECL find (const _Elem *_First, size_t _Count, const _Elem &_Ch)
 
static _Elem *__CLRCALL_OR_CDECL move (_Elem *_First1, const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL assign (_Elem *_First, size_t _Count, _Elem _Ch)
 
static void __CLRCALL_OR_CDECL assign (_Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL eq (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL lt (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr _Elem __CLRCALL_OR_CDECL to_char_type (const int_type &_Meta) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL to_int_type (const _Elem &_Ch) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL eq_int_type (const int_type &_Left, const int_type &_Right) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL not_eof (const int_type &_Meta) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL eof () _NOEXCEPT
 

Member Typedef Documentation

typedef char char_traits< char >::_Elem
typedef _Elem char_traits< char >::char_type
typedef int char_traits< char >::int_type
typedef streamoff char_traits< char >::off_type
typedef streampos char_traits< char >::pos_type
typedef _Mbstatet char_traits< char >::state_type

Member Function Documentation

static _Elem* __CLRCALL_OR_CDECL char_traits< char >::_Copy_s ( _Out_writes_(_Size_in_bytes) _Elem _First1,
size_t  _Size_in_bytes,
_In_reads_(_Count) const _Elem _First2,
size_t  _Count 
)
inlinestatic
537  { // copy [_First2, _First2 + _Count) to [_First1, ...)
538  if (0 < _Count)
539  _CRT_SECURE_MEMCPY(_First1, _Size_in_bytes, _First2, _Count);
540  return (_First1);
541  }
unsigned int _Count
Definition: xcomplex:668
#define _CRT_SECURE_MEMCPY(dest, destsize, source, count)
Definition: yvals.h:406
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::assign ( _Elem _First,
size_t  _Count,
_Elem  _Ch 
)
inlinestatic
559  { // assign _Count * _Ch to [_First, ...)
560  return ((_Elem *)_CSTD memset(_First, _Ch, _Count));
561  }
unsigned int _Count
Definition: xcomplex:668
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:507
static void __CLRCALL_OR_CDECL char_traits< char >::assign ( _Elem _Left,
const _Elem _Right 
)
inlinestatic
564  { // assign an element
565  _Left = _Right;
566  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr const _Ty &() _Right
Definition: algorithm:3591
static int __CLRCALL_OR_CDECL char_traits< char >::compare ( const _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
516  { // compare [_First1, _First1 + _Count) with [_First2, ...)
517  return (_Count == 0 ? 0
518  : _CSTD memcmp(_First1, _First2, _Count));
519  }
unsigned int _Count
Definition: xcomplex:668
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) void const *_Buf1, _In_reads_bytes_(_Size) void const *_Buf2, _In_ size_t _Size)
#define _CSTD
Definition: yvals.h:570
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::copy ( _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
529  { // copy [_First2, _First2 + _Count) to [_First1, ...)
530  return (_Count == 0 ? _First1
531  : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
532  }
unsigned int _Count
Definition: xcomplex:668
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:507
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::eof ( )
inlinestatic
605  { // return end-of-file metacharacter
606  return (EOF);
607  }
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::eq ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
570  { // test for element equality
571  return (_Left == _Right);
572  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr const _Ty &() _Right
Definition: algorithm:3591
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::eq_int_type ( const int_type _Left,
const int_type _Right 
)
inlinestatic
594  { // test for metacharacter equality
595  return (_Left == _Right);
596  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr const _Ty &() _Right
Definition: algorithm:3591
static const _Elem* __CLRCALL_OR_CDECL char_traits< char >::find ( const _Elem _First,
size_t  _Count,
const _Elem _Ch 
)
inlinestatic
545  { // look for _Ch in [_First, _First + _Count)
546  return (_Count == 0 ? (const _Elem *)0
547  : (const _Elem *)_CSTD memchr(_First, _Ch, _Count));
548  }
unsigned int _Count
Definition: xcomplex:668
_CRT_BEGIN_C_HEADER _Check_return_ _VCRTIMP void _CONST_RETURN *__cdecl memchr(_In_reads_bytes_opt_(_MaxCount) void const *_Buf, _In_ int _Val, _In_ size_t _MaxCount)
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:507
static size_t __CLRCALL_OR_CDECL char_traits< char >::length ( const _Elem _First)
inlinestatic
522  { // find length of null-terminated string
523  return (*_First == 0 ? 0
524  : _CSTD strlen(_First));
525  }
#define _CSTD
Definition: yvals.h:570
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::lt ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
576  { // test if _Left precedes _Right
577  return ((unsigned char)_Left < (unsigned char)_Right);
578  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr const _Ty &() _Right
Definition: algorithm:3591
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::move ( _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
552  { // copy [_First2, _First2 + _Count) to [_First1, ...)
553  return (_Count == 0 ? _First1
554  : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
555  }
_VCRTIMP void *__cdecl memmove(_Out_writes_bytes_all_opt_(_Size) void *_Dst, _In_reads_bytes_opt_(_Size) void const *_Src, _In_ size_t _Size)
unsigned int _Count
Definition: xcomplex:668
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:507
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::not_eof ( const int_type _Meta)
inlinestatic
600  { // return anything but EOF
601  return (_Meta != eof() ? _Meta : !eof());
602  }
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:604
static constexpr _Elem __CLRCALL_OR_CDECL char_traits< char >::to_char_type ( const int_type _Meta)
inlinestatic
582  { // convert metacharacter to character
583  return ((_Elem)_Meta);
584  }
char _Elem
Definition: iosfwd:507
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::to_int_type ( const _Elem _Ch)
inlinestatic
588  { // convert character to metacharacter
589  return ((unsigned char)_Ch);
590  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89

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