Embedded Template Library 1.0
memory.h File Reference
#include "platform.h"
#include "algorithm.h"
#include "type_traits.h"
#include "iterator.h"
#include "utility.h"
#include "nullptr.h"
#include "alignment.h"
#include "placement_new.h"
#include "private/addressof.h"
#include <assert.h>
#include <string.h>
#include <memory>

Go to the source code of this file.

Classes

struct  etl::default_delete< T >
 
struct  etl::default_delete< T[]>
 
class  etl::unique_ptr< T, TDeleter >
 
class  etl::unique_ptr< T[], TDeleter >
 
struct  etl::create_copy< T >
 
struct  etl::wipe_on_destruct< T >
 
class  etl::uninitialized_buffer< VObject_Size, VN_Objects, VAlignment >
 
class  etl::uninitialized_buffer_of< T, VN_Objects >
 

Namespaces

namespace  etl
 bitset_ext
 

Functions

template<typename TOutputIterator , typename T >
TOutputIterator etl::uninitialized_fill (TOutputIterator o_begin, TOutputIterator o_end, const T &value)
 
template<typename TOutputIterator , typename T , typename TCounter >
TOutputIterator etl::uninitialized_fill (TOutputIterator o_begin, TOutputIterator o_end, const T &value, TCounter &count)
 
template<typename TOutputIterator , typename TSize , typename T >
TOutputIterator etl::uninitialized_fill_n (TOutputIterator o_begin, TSize n, const T &value)
 
template<typename TOutputIterator , typename TSize , typename T , typename TCounter >
TOutputIterator etl::uninitialized_fill_n (TOutputIterator o_begin, TSize n, const T &value, TCounter &count)
 
template<typename TInputIterator , typename TOutputIterator >
TOutputIterator etl::uninitialized_copy (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
 
template<typename TInputIterator , typename TOutputIterator , typename TCounter >
TOutputIterator etl::uninitialized_copy (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter &count)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator >
TOutputIterator etl::uninitialized_copy_n (TInputIterator i_begin, TSize n, TOutputIterator o_begin)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TCounter >
TOutputIterator etl::uninitialized_copy_n (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TCounter &count)
 
template<typename TInputIterator , typename TOutputIterator >
TOutputIterator etl::uninitialized_move (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
 
template<typename TInputIterator , typename TOutputIterator , typename TCounter >
TOutputIterator etl::uninitialized_move (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter &count)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator >
TOutputIterator etl::uninitialized_move_n (TInputIterator i_begin, TSize n, TOutputIterator o_begin)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TCounter >
TOutputIterator etl::uninitialized_move_n (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TCounter &count)
 
template<typename TOutputIterator >
etl::enable_if< etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_default_construct (TOutputIterator, TOutputIterator)
 
template<typename TOutputIterator >
etl::enable_if<!etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_default_construct (TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TOutputIterator , typename TCounter >
etl::enable_if< etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_default_construct (TOutputIterator o_begin, TOutputIterator o_end, TCounter &count)
 
template<typename TOutputIterator , typename TCounter >
etl::enable_if<!etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_default_construct (TOutputIterator o_begin, TOutputIterator o_end, TCounter &count)
 
template<typename TOutputIterator , typename TSize >
etl::enable_if< etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, TOutputIterator >::type etl::uninitialized_default_construct_n (TOutputIterator o_begin, TSize n)
 
template<typename TOutputIterator , typename TSize >
etl::enable_if<!etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, TOutputIterator >::type etl::uninitialized_default_construct_n (TOutputIterator o_begin, TSize n)
 
template<typename TOutputIterator , typename TSize , typename TCounter >
etl::enable_if< etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, TOutputIterator >::type etl::uninitialized_default_construct_n (TOutputIterator o_begin, TSize n, TCounter &count)
 
template<typename TOutputIterator , typename TSize , typename TCounter >
etl::enable_if<!etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, TOutputIterator >::type etl::uninitialized_default_construct_n (TOutputIterator o_begin, TSize n, TCounter &count)
 
template<typename TOutputIterator >
etl::enable_if< etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_value_construct (TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TOutputIterator >
etl::enable_if<!etl::is_trivially_constructible< typenameetl::iterator_traits< TOutputIterator >::value_type >::value, void >::type etl::uninitialized_value_construct (TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TOutputIterator , typename TCounter >
void etl::uninitialized_value_construct (TOutputIterator o_begin, TOutputIterator o_end, TCounter &count)
 
template<typename TOutputIterator , typename TSize >
TOutputIterator etl::uninitialized_value_construct_n (TOutputIterator o_begin, TSize n)
 
template<typename TOutputIterator , typename TSize , typename TCounter >
TOutputIterator etl::uninitialized_value_construct_n (TOutputIterator o_begin, TSize n, TCounter &count)
 
template<typename T >
T * etl::construct_at (T *p)
 
template<typename T , typename TArg >
T * etl::construct_at (T *p, const TArg &arg)
 
template<typename T >
etl::enable_if< etl::is_trivially_destructible< T >::value, void >::type etl::destroy_at (T *)
 
template<typename T >
etl::enable_if<!etl::is_trivially_destructible< T >::value, void >::type etl::destroy_at (T *p)
 
template<typename T , typename TCounter >
etl::enable_if< etl::is_trivially_destructible< T >::value, void >::type etl::destroy_at (T *, TCounter &count)
 
template<typename T , typename TCounter >
etl::enable_if<!etl::is_trivially_destructible< T >::value, void >::type etl::destroy_at (T *p, TCounter &count)
 
template<typename TIterator >
etl::enable_if< etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, void >::type etl::destroy (TIterator, TIterator)
 
template<typename TIterator >
etl::enable_if<!etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, void >::type etl::destroy (TIterator i_begin, TIterator i_end)
 
template<typename TIterator , typename TCounter >
etl::enable_if< etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, void >::type etl::destroy (TIterator i_begin, TIterator i_end, TCounter &count)
 
template<typename TIterator , typename TCounter >
etl::enable_if<!etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, void >::type etl::destroy (TIterator i_begin, TIterator i_end, TCounter &count)
 
template<typename TIterator , typename TSize >
etl::enable_if< etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, TIterator >::type etl::destroy_n (TIterator i_begin, TSize n)
 
template<typename TIterator , typename TSize >
etl::enable_if<!etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, TIterator >::type etl::destroy_n (TIterator i_begin, TSize n)
 
template<typename TIterator , typename TSize , typename TCounter >
etl::enable_if< etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, TIterator >::type etl::destroy_n (TIterator i_begin, TSize n, TCounter &count)
 
template<typename TIterator , typename TSize , typename TCounter >
etl::enable_if<!etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, TIterator >::type etl::destroy_n (TIterator i_begin, TSize n, TCounter &count)
 
template<typename T1 , typename TD1 , typename T2 , typename TD2 >
bool operator== (const etl::unique_ptr< T1, TD1 > &lhs, const etl::unique_ptr< T2, TD2 > &rhs)
 
template<typename T1 , typename TD1 , typename T2 , typename TD2 >
bool operator< (const etl::unique_ptr< T1, TD1 > &lhs, const etl::unique_ptr< T2, TD2 > &rhs)
 
template<typename T1 , typename TD1 , typename T2 , typename TD2 >
bool operator<= (const etl::unique_ptr< T1, TD1 > &lhs, const etl::unique_ptr< T2, TD2 > &rhs)
 
template<typename T1 , typename TD1 , typename T2 , typename TD2 >
bool operator> (const etl::unique_ptr< T1, TD1 > &lhs, const etl::unique_ptr< T2, TD2 > &rhs)
 
template<typename T1 , typename TD1 , typename T2 , typename TD2 >
bool operator>= (const etl::unique_ptr< T1, TD1 > &lhs, const etl::unique_ptr< T2, TD2 > &rhs)
 
template<typename T >
etl::enable_if< etl::is_trivially_constructible< T >::value, void >::type etl::create_default_at (T *)
 
template<typename T , typename TCounter >
etl::enable_if< etl::is_trivially_constructible< T >::value, void >::type etl::create_default_at (T *, TCounter &count)
 
template<typename T >
etl::enable_if<!etl::is_trivially_constructible< T >::value, void >::type etl::create_default_at (T *p)
 
template<typename T , typename TCounter >
etl::enable_if<!etl::is_trivially_constructible< T >::value, void >::type etl::create_default_at (T *p, TCounter &count)
 
template<typename T >
void etl::create_value_at (T *p)
 
template<typename T , typename TCounter >
void etl::create_value_at (T *p, TCounter &count)
 
template<typename T >
void etl::create_copy_at (T *p, const T &value)
 
template<typename T , typename TCounter >
void etl::create_copy_at (T *p, const T &value, TCounter &count)
 
template<typename T >
T & etl::make_default_at (T *p)
 
template<typename T , typename TCounter >
T & etl::make_default_at (T *p, TCounter &count)
 
template<typename T >
T & etl::make_copy_at (T *p, const T &other)
 
template<typename T , typename TCounter >
T & etl::make_copy_at (T *p, const T &other, TCounter &count)
 
template<typename T , typename TParameter >
T & etl::make_value_at (T *p, const TParameter &value)
 
template<typename T , typename TParameter , typename TCounter >
T & etl::make_value_at (T *p, const TParameter &value, TCounter &count)
 
void etl::memory_clear (volatile char *p, size_t n)
 
template<typename T >
void etl::memory_clear (volatile T &object)
 
template<typename T >
void etl::memory_clear_range (volatile T *begin, size_t n)
 
template<typename T >
void etl::memory_clear_range (volatile T *begin, volatile T *end)
 
void etl::memory_set (volatile char *p, size_t n, char value)
 
template<typename T >
void etl::memory_set (volatile T &object, const char value)
 
template<typename T >
void etl::memory_set_range (volatile T *begin, size_t n, const char value)
 
template<typename T >
void etl::memory_set_range (volatile T *begin, volatile T *end, const char value)
 
template<typename TPointer >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_copy (const TPointer sb, const TPointer se, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_copy (const TPointer sb, size_t n, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_move (const TPointer sb, const TPointer se, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_move (const TPointer sb, size_t n, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer >
ETL_NODISCARD etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, int >::type etl::mem_compare (const TPointer sb, const TPointer se, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer >
ETL_NODISCARD etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, int >::type etl::mem_compare (const TPointer sb, size_t n, TPointer db) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_set (TPointer db, const TPointer de, T value) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
etl::enable_if< etl::is_trivially_copyable< typenameetl::iterator_traits< TPointer >::value_type >::value, TPointer >::type etl::mem_set (const TPointer db, size_t n, T value) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
ETL_NODISCARD etl::enable_if< etl::is_pointer< TPointer >::value &&!etl::is_const< typenameetl::remove_pointer< TPointer >::type >::value, char * >::type etl::mem_char (TPointer sb, TPointer se, T value) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
ETL_NODISCARD etl::enable_if< etl::is_pointer< TPointer >::value &&etl::is_const< typenameetl::remove_pointer< TPointer >::type >::value, constchar * >::type etl::mem_char (TPointer sb, TPointer se, T value) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
ETL_NODISCARD etl::enable_if< etl::is_pointer< TPointer >::value &&!etl::is_const< typenameetl::remove_pointer< TPointer >::type >::value, char * >::type etl::mem_char (TPointer sb, size_t n, T value) ETL_NOEXCEPT
 
template<typename TPointer , typename T >
ETL_NODISCARD etl::enable_if< etl::is_pointer< TPointer >::value &&etl::is_const< typenameetl::remove_pointer< TPointer >::type >::value, constchar * >::type etl::mem_char (TPointer sb, size_t n, T value) ETL_NOEXCEPT
 
template<typename TObject >
TObject & etl::construct_object_at (void *p)
 Default construct the container at 'p'.
 
template<typename TObject >
TObject & etl::construct_object_at (void *p, const TObject &other)
 Copy construct the container at 'p'.
 
template<typename TObject , typename TArg >
TObject & etl::construct_object_at (void *p, const TArg &arg)
 Construct the container at 'p' from argument.
 
template<typename TObject >
TObject & etl::get_object_at (void *p)
 Get the container at 'p'.
 
template<typename TObject >
void etl::destroy_object_at (void *p)