Macros | Functions
Raw Storage Algorithms

Macros

#define get_temporary_buffer(size, ptype)   make_temporary_buffer (alloca(size_of_elements(size, ptype)), size, ptype)
 Allocates a temporary buffer, if possible.
 

Functions

template<typename T >
void ustl::construct (T *p)
 
template<typename ForwardIterator >
void ustl::construct (ForwardIterator first, ForwardIterator last)
 
template<typename T >
void ustl::construct (T *p, const T &value)
 
template<typename T >
void ustl::destroy (T *p) noexcept
 
template<typename ForwardIterator >
void ustl::destroy (ForwardIterator first, ForwardIterator last) noexcept
 
template<typename T >
pair< T *, ptrdiff_t > ustl::make_temporary_buffer (void *p, size_t n, const T *ptype)
 Creates a temporary buffer pair from p and n This is intended to be used with alloca to create temporary buffers. The size in the returned pair is set to 0 if the allocation is unsuccessful.
 
template<typename InputIterator , typename ForwardIterator >
ForwardIterator ustl::uninitialized_copy (InputIterator first, InputIterator last, ForwardIterator result)
 
template<typename InputIterator , typename ForwardIterator >
ForwardIterator ustl::uninitialized_copy_n (InputIterator first, size_t n, ForwardIterator result)
 
template<typename ForwardIterator , typename T >
void ustl::uninitialized_fill (ForwardIterator first, ForwardIterator last, const T &v)
 
template<typename ForwardIterator , typename T >
ForwardIterator ustl::uninitialized_fill_n (ForwardIterator first, size_t n, const T &v)
 

Detailed Description

Algorithms for manipulating unstructured memory.

Function Documentation

template<typename T >
void ustl::construct ( T *  p)
inline
template<typename ForwardIterator >
void ustl::construct ( ForwardIterator  first,
ForwardIterator  last 
)
inline

Calls the placement new on p.

References ustl::construct(), ustl::distance(), and ustl::max().

template<typename T >
void ustl::construct ( T *  p,
const T &  value 
)
inline

Calls the placement new on p.

template<typename T >
void ustl::destroy ( T *  p)
inlinenoexcept

Calls the destructor of p without calling delete.

Referenced by ustl::vector< T >::deallocate(), ustl::vector< T >::erase(), ustl::vector< T >::resize(), and ustl::vector< T >::~vector().

template<typename ForwardIterator >
void ustl::destroy ( ForwardIterator  first,
ForwardIterator  last 
)
inlinenoexcept

Calls the destructor on elements in range [first, last) without calling delete.

template<typename InputIterator , typename ForwardIterator >
ForwardIterator ustl::uninitialized_copy ( InputIterator  first,
InputIterator  last,
ForwardIterator  result 
)

Copies [first, last) into result by calling copy constructors in result.

References ustl::construct().

Referenced by ustl::vector< T >::insert(), and ustl::vector< T >::vector().

template<typename InputIterator , typename ForwardIterator >
ForwardIterator ustl::uninitialized_copy_n ( InputIterator  first,
size_t  n,
ForwardIterator  result 
)

Copies [first, first + n) into result by calling copy constructors in result.

References ustl::construct().

Referenced by ustl::vector< T >::vector().

template<typename ForwardIterator , typename T >
void ustl::uninitialized_fill ( ForwardIterator  first,
ForwardIterator  last,
const T &  v 
)

Calls construct on all elements in [first, last) with value v.

References ustl::construct().

template<typename ForwardIterator , typename T >
ForwardIterator ustl::uninitialized_fill_n ( ForwardIterator  first,
size_t  n,
const T &  v 
)

Calls construct on all elements in [first, first + n) with value v.

References ustl::construct().

Referenced by ustl::vector< T >::insert(), and ustl::vector< T >::vector().


Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10