STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | 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
 

Public Member Functions

 _Pre_satisfies_ (_Size_in_bytes >=_Count) static _Elem *__CLRCALL_OR_CDECL _Copy_s(_Out_writes_all_(_Size_in_bytes) _Elem *const _First1
 
const size_t _In_reads_ (_Count) const _Elem *const _First2
 
 return (_First1)
 

Static Public Member Functions

static int __CLRCALL_OR_CDECL compare (_In_reads_(_Count) const _Elem *const _First1, _In_reads_(_Count) const _Elem *const _First2, const size_t _Count) _NOEXCEPT
 
static size_t __CLRCALL_OR_CDECL length (_In_z_ const _Elem *const _First) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL copy (_Out_writes_(_Count) _Elem *const _First1, _In_reads_(_Count) const _Elem *const _First2, const size_t _Count) _NOEXCEPT
 
static const _Elem *__CLRCALL_OR_CDECL find (_In_reads_(_Count) const _Elem *const _First, const size_t _Count, const _Elem &_Ch) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL move (_Out_writes_all_(_Count) _Elem *const _First1, _In_reads_(_Count) const _Elem *const _First2, const size_t _Count) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL assign (_Out_writes_all_(_Count) _Elem *const _First, const size_t _Count, const _Elem _Ch) _NOEXCEPT
 
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
 

Public Attributes

const size_t _Size_in_bytes
 
const size_t const size_t _Count _NOEXCEPT
 

Member Typedef Documentation

typedef char char_traits< char >::_Elem

Member Function Documentation

const size_t char_traits< char >::_In_reads_ ( _Count  ) const
char_traits< char >::_Pre_satisfies_ ( _Size_in_bytes >=  _Count) const
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::assign ( _Out_writes_all_(_Count) _Elem *const  _First,
const size_t  _Count,
const _Elem  _Ch 
)
inlinestatic
511  { // assign _Count * _Ch to [_First, ...)
512  return ((_Elem *)_CSTD memset(_First, _Ch, _Count));
513  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:465
static void __CLRCALL_OR_CDECL char_traits< char >::assign ( _Elem _Left,
const _Elem _Right 
)
inlinestatic
516  { // assign an element
517  _Left = _Right;
518  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
static int __CLRCALL_OR_CDECL char_traits< char >::compare ( _In_reads_(_Count) const _Elem *const  _First1,
_In_reads_(_Count) const _Elem *const  _First2,
const size_t  _Count 
)
inlinestatic
474  { // compare [_First1, _First1 + _Count) with [_First2, ...)
475  return (_CSTD memcmp(_First1, _First2, _Count));
476  }
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) void const *_Buf1, _In_reads_bytes_(_Size) void const *_Buf2, _In_ size_t _Size)
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::copy ( _Out_writes_(_Count) _Elem *const  _First1,
_In_reads_(_Count) const _Elem *const  _First2,
const size_t  _Count 
)
inlinestatic
485  { // copy [_First2, _First2 + _Count) to [_First1, ...)
486  return ((_Elem *)_CSTD memcpy(_First1, _First2, _Count));
487  }
memcpy(_Destination, _Source, _SourceSize)
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:465
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::eof ( )
inlinestatic
551  { // return end-of-file metacharacter
552  return (EOF);
553  }
#define EOF
Definition: stdio.h:36
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::eq ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
521  { // test for element equality
522  return (_Left == _Right);
523  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::eq_int_type ( const int_type _Left,
const int_type _Right 
)
inlinestatic
541  { // test for metacharacter equality
542  return (_Left == _Right);
543  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
static const _Elem* __CLRCALL_OR_CDECL char_traits< char >::find ( _In_reads_(_Count) const _Elem *const  _First,
const size_t  _Count,
const _Elem _Ch 
)
inlinestatic
499  { // look for _Ch in [_First, _First + _Count)
500  return ((const _Elem *)_CSTD memchr(_First, _Ch, _Count));
501  }
_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
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:465
static size_t __CLRCALL_OR_CDECL char_traits< char >::length ( _In_z_ const _Elem *const  _First)
inlinestatic
479  { // find length of null-terminated string
480  return (_CSTD strlen(_First));
481  }
_Check_return_ size_t __cdecl strlen(_In_z_ char const *_Str)
#define _CSTD
Definition: yvals.h:570
static constexpr bool __CLRCALL_OR_CDECL char_traits< char >::lt ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
526  { // test if _Left precedes _Right
527  return ((unsigned char)_Left < (unsigned char)_Right);
528  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::move ( _Out_writes_all_(_Count) _Elem *const  _First1,
_In_reads_(_Count) const _Elem *const  _First2,
const size_t  _Count 
)
inlinestatic
505  { // copy [_First2, _First2 + _Count) to [_First1, ...)
506  return ((_Elem *)_CSTD memmove(_First1, _First2, _Count));
507  }
_VCRTIMP void *__cdecl memmove(_Out_writes_bytes_all_opt_(_Size) void *_Dst, _In_reads_bytes_opt_(_Size) void const *_Src, _In_ size_t _Size)
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
char _Elem
Definition: iosfwd:465
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::not_eof ( const int_type _Meta)
inlinestatic
546  { // return anything but EOF
547  return (_Meta != eof() ? _Meta : !eof());
548  }
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:550
char_traits< char >::return ( _First1  )
static constexpr _Elem __CLRCALL_OR_CDECL char_traits< char >::to_char_type ( const int_type _Meta)
inlinestatic
531  { // convert metacharacter to character
532  return ((_Elem)_Meta);
533  }
char _Elem
Definition: iosfwd:465
static constexpr int_type __CLRCALL_OR_CDECL char_traits< char >::to_int_type ( const _Elem _Ch)
inlinestatic
536  { // convert character to metacharacter
537  return ((unsigned char)_Ch);
538  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89

Member Data Documentation

const size_t const size_t _Count char_traits< char >::_NOEXCEPT
Initial value:
const size_t char_traits< char >::_Size_in_bytes

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