ReactOS 0.4.15-dev-7934-g1dc8d80
_CArray< _Tp, _Nb > Struct Template Reference

#include <_carray.h>

Public Member Functions

 _CArray (const _Tp &__val)
 
 ~_CArray ()
 
_Tp & operator[] (size_t __i)
 

Private Attributes

char _M_data [sizeof(_Tp) *_Nb]
 

Detailed Description

template<class _Tp, size_t _Nb>
struct _CArray< _Tp, _Nb >

Definition at line 36 of file _carray.h.

Constructor & Destructor Documentation

◆ _CArray()

template<class _Tp , size_t _Nb>
_CArray< _Tp, _Nb >::_CArray ( const _Tp &  __val)
inline

Definition at line 37 of file _carray.h.

37 {
38 for (size_t __i = 0; __i < _Nb; ++__i) {
39 _Copy_Construct(__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)), __val);
40 }
41 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
void _Copy_Construct(_Tp *__p, const _Tp &__val)
Definition: _construct.h:130
#define __REINTERPRET_CAST(__x, __y)
Definition: features.h:586
char _M_data[sizeof(_Tp) *_Nb]
Definition: _carray.h:54

◆ ~_CArray()

template<class _Tp , size_t _Nb>
_CArray< _Tp, _Nb >::~_CArray ( )
inline

Definition at line 43 of file _carray.h.

43 {
45 __REINTERPRET_CAST(_Tp*, _M_data + _Nb * sizeof(_Tp)));
46 }
void _Destroy_Range(_ForwardIterator __first, _ForwardIterator __last)
Definition: _construct.h:219

Member Function Documentation

◆ operator[]()

template<class _Tp , size_t _Nb>
_Tp & _CArray< _Tp, _Nb >::operator[] ( size_t  __i)
inline

Definition at line 48 of file _carray.h.

48 {
49 _STLP_ASSERT(__i < _Nb)
50 return *__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp));
51 }
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

Member Data Documentation

◆ _M_data

template<class _Tp , size_t _Nb>
char _CArray< _Tp, _Nb >::_M_data[sizeof(_Tp) *_Nb]
private

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