ReactOS  0.4.14-dev-342-gdc047f9
_Valarray_base< _Tp > Struct Template Reference

#include <_valarray.h>

Inheritance diagram for _Valarray_base< _Tp >:
Collaboration diagram for _Valarray_base< _Tp >:

Public Member Functions

 _Valarray_base ()
 
 _Valarray_base (size_t __n)
 
 ~_Valarray_base ()
 
void _M_allocate (size_t __n)
 
void _M_deallocate ()
 

Public Attributes

_Tp * _M_first
 
size_t _M_size
 

Detailed Description

template<class _Tp>
struct _Valarray_base< _Tp >

Definition at line 64 of file _valarray.h.

Constructor & Destructor Documentation

◆ _Valarray_base() [1/2]

template<class _Tp>
_Valarray_base< _Tp >::_Valarray_base ( )
inline

Definition at line 68 of file _valarray.h.

68 : _M_first(0), _M_size(0) {}
size_t _M_size
Definition: _valarray.h:66
_Tp * _M_first
Definition: _valarray.h:65

◆ _Valarray_base() [2/2]

template<class _Tp>
_Valarray_base< _Tp >::_Valarray_base ( size_t  __n)
inline

Definition at line 69 of file _valarray.h.

69 : _M_first(0), _M_size(0) { _M_allocate(__n); }
return __n
Definition: _algo.h:75
size_t _M_size
Definition: _valarray.h:66
_Tp * _M_first
Definition: _valarray.h:65
void _M_allocate(size_t __n)
Definition: _valarray.h:72

◆ ~_Valarray_base()

template<class _Tp>
_Valarray_base< _Tp >::~_Valarray_base ( )
inline

Definition at line 70 of file _valarray.h.

70 { _M_deallocate(); }
void _M_deallocate()
Definition: _valarray.h:83

Member Function Documentation

◆ _M_allocate()

template<class _Tp>
void _Valarray_base< _Tp >::_M_allocate ( size_t  __n)
inline

Definition at line 72 of file _valarray.h.

72  {
73  if (__n != 0) {
74  _M_first = __STATIC_CAST(_Tp*, __stl_new(__n * sizeof(_Tp)));
75  _M_size = __n;
76  }
77  else {
78  _M_first = 0;
79  _M_size = 0;
80  }
81  }
return __n
Definition: _algo.h:75
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
size_t _M_size
Definition: _valarray.h:66
_STLP_BEGIN_NAMESPACE void *_STLP_CALL __stl_new(size_t __n)
Definition: _new.h:134
_Tp * _M_first
Definition: _valarray.h:65

Referenced by _Valarray_base< bool >::_Valarray_base(), and valarray< bool >::resize().

◆ _M_deallocate()

template<class _Tp>
void _Valarray_base< _Tp >::_M_deallocate ( )
inline

Definition at line 83 of file _valarray.h.

83  {
85  _M_first = 0;
86  _M_size = 0;
87  }
void _STLP_CALL __stl_delete(void *__p)
Definition: _new.h:135
size_t _M_size
Definition: _valarray.h:66
_Tp * _M_first
Definition: _valarray.h:65

Referenced by valarray< bool >::resize(), and _Valarray_base< bool >::~_Valarray_base().

Member Data Documentation

◆ _M_first

◆ _M_size


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