3.8.0
Freundlich's C++ toolkit
Classes | Public Types | Public Member Functions
fcppt::container::raw_vector::object< T, A > Class Template Reference

Detailed Description

template<typename T, typename A>
class fcppt::container::raw_vector::object< T, A >

A special vector class that can handle uninitialized memory.

Template Parameters
TA POD type.
AThe allocator type.

See fcppt.container.raw_vector for more information.

Public Types

using value_type = T
 
using allocator_type = A
 
using size_type = typename std::allocator_traits< A >::size_type
 
using difference_type = typename std::allocator_traits< A >::difference_type
 
using pointer = typename std::allocator_traits< A >::pointer
 
using const_pointer = typename std::allocator_traits< A >::const_pointer
 
using reference = T &
 
using const_reference = T const &
 
using iterator = pointer
 
using const_iterator = const_pointer
 

Public Member Functions

iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
reference operator[] (size_type) noexcept
 
const_reference operator[] (size_type) const noexcept
 
reference front () noexcept
 
const_reference front () const noexcept
 
reference back () noexcept
 
const_reference back () const noexcept
 
pointer data () noexcept
 Returns the pointer to the store. More...
 
const_pointer data () const noexcept
 Returns the pointer to the store. More...
 
pointer data_end () noexcept
 Returns the pointer to the end of the store. More...
 
const_pointer data_end () const noexcept
 Returns the pointer to the end of the store. More...
 
 object ()
 
 object (A const &)
 
 object (size_type sz, T const &value)
 
 object (size_type sz, T const &value, A const &)
 
template<typename In >
 object (In beg, In end)
 
template<typename In >
 object (In beg, In end, A const &)
 
 object (fcppt::container::raw_vector::rep< A > const &) noexcept
 Reuse the storage of another container. More...
 
 object (std::initializer_list< value_type >)
 
 object (std::initializer_list< value_type >, A const &)
 
 object (object &&) noexcept
 
 ~object () noexcept
 
objectoperator= (object &&) noexcept
 
void push_back (T const &)
 
void pop_back () noexcept
 
void clear () noexcept
 
size_type size () const noexcept
 
bool empty () const noexcept
 
size_type capacity () const noexcept
 
void swap (object &) noexcept
 
void resize (size_type sz, T const &value)
 
void reserve (size_type sz)
 
allocator_type get_allocator () const
 
iterator insert (iterator position, T const &t)
 
void insert (iterator position, size_type sz, T const &value)
 
template<typename In >
void insert (iterator position, In beg, In end)
 
iterator erase (iterator position) noexcept
 
iterator erase (iterator first, iterator last) noexcept
 
void shrink_to_fit ()
 

Member Typedef Documentation

◆ allocator_type

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::allocator_type = A

◆ const_iterator

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::const_iterator = const_pointer

◆ const_pointer

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::const_pointer = typename std::allocator_traits<A>::const_pointer

◆ const_reference

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::const_reference = T const &

◆ difference_type

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::difference_type = typename std::allocator_traits<A>::difference_type

◆ iterator

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::iterator = pointer

◆ pointer

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::pointer = typename std::allocator_traits<A>::pointer

◆ reference

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::reference = T &

◆ size_type

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::size_type = typename std::allocator_traits<A>::size_type

◆ value_type

template<typename T , typename A >
using fcppt::container::raw_vector::object< T, A >::value_type = T

Constructor & Destructor Documentation

◆ object() [1/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( )

◆ object() [2/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( A const &  )
explicit

◆ object() [3/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( size_type  sz,
T const &  value 
)

◆ object() [4/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( size_type  sz,
T const &  value,
A const &   
)

◆ object() [5/10]

template<typename T , typename A >
template<typename In >
fcppt::container::raw_vector::object< T, A >::object ( In  beg,
In  end 
)

◆ object() [6/10]

template<typename T , typename A >
template<typename In >
fcppt::container::raw_vector::object< T, A >::object ( In  beg,
In  end,
A const &   
)

◆ object() [7/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( fcppt::container::raw_vector::rep< A > const &  )
explicitnoexcept

Reuse the storage of another container.

◆ object() [8/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( std::initializer_list< value_type )

◆ object() [9/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( std::initializer_list< value_type ,
A const &   
)

◆ object() [10/10]

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::object ( object< T, A > &&  )
noexcept

◆ ~object()

template<typename T , typename A >
fcppt::container::raw_vector::object< T, A >::~object ( )
noexcept

Member Function Documentation

◆ back() [1/2]

template<typename T , typename A >
const_reference fcppt::container::raw_vector::object< T, A >::back ( ) const
noexcept

◆ back() [2/2]

template<typename T , typename A >
reference fcppt::container::raw_vector::object< T, A >::back ( )
noexcept

◆ begin() [1/2]

template<typename T , typename A >
const_iterator fcppt::container::raw_vector::object< T, A >::begin ( ) const
noexcept

◆ begin() [2/2]

template<typename T , typename A >
iterator fcppt::container::raw_vector::object< T, A >::begin ( )
noexcept

◆ capacity()

template<typename T , typename A >
size_type fcppt::container::raw_vector::object< T, A >::capacity ( ) const
noexcept

◆ clear()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::clear ( )
noexcept

◆ data() [1/2]

template<typename T , typename A >
const_pointer fcppt::container::raw_vector::object< T, A >::data ( ) const
noexcept

Returns the pointer to the store.

◆ data() [2/2]

template<typename T , typename A >
pointer fcppt::container::raw_vector::object< T, A >::data ( )
noexcept

Returns the pointer to the store.

◆ data_end() [1/2]

template<typename T , typename A >
const_pointer fcppt::container::raw_vector::object< T, A >::data_end ( ) const
noexcept

Returns the pointer to the end of the store.

Equal to data() + size().

◆ data_end() [2/2]

template<typename T , typename A >
pointer fcppt::container::raw_vector::object< T, A >::data_end ( )
noexcept

Returns the pointer to the end of the store.

Equal to data() + size().

◆ empty()

template<typename T , typename A >
bool fcppt::container::raw_vector::object< T, A >::empty ( ) const
noexcept

◆ end() [1/2]

template<typename T , typename A >
const_iterator fcppt::container::raw_vector::object< T, A >::end ( ) const
noexcept

◆ end() [2/2]

template<typename T , typename A >
iterator fcppt::container::raw_vector::object< T, A >::end ( )
noexcept

◆ erase() [1/2]

template<typename T , typename A >
iterator fcppt::container::raw_vector::object< T, A >::erase ( iterator  first,
iterator  last 
)
noexcept

◆ erase() [2/2]

template<typename T , typename A >
iterator fcppt::container::raw_vector::object< T, A >::erase ( iterator  position)
noexcept

◆ front() [1/2]

template<typename T , typename A >
const_reference fcppt::container::raw_vector::object< T, A >::front ( ) const
noexcept

◆ front() [2/2]

template<typename T , typename A >
reference fcppt::container::raw_vector::object< T, A >::front ( )
noexcept

◆ get_allocator()

template<typename T , typename A >
allocator_type fcppt::container::raw_vector::object< T, A >::get_allocator ( ) const

◆ insert() [1/3]

template<typename T , typename A >
template<typename In >
void fcppt::container::raw_vector::object< T, A >::insert ( iterator  position,
In  beg,
In  end 
)

◆ insert() [2/3]

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::insert ( iterator  position,
size_type  sz,
T const &  value 
)

◆ insert() [3/3]

template<typename T , typename A >
iterator fcppt::container::raw_vector::object< T, A >::insert ( iterator  position,
T const &  t 
)

◆ operator=()

template<typename T , typename A >
object& fcppt::container::raw_vector::object< T, A >::operator= ( object< T, A > &&  )
noexcept

◆ operator[]() [1/2]

template<typename T , typename A >
const_reference fcppt::container::raw_vector::object< T, A >::operator[] ( size_type  ) const
noexcept

◆ operator[]() [2/2]

template<typename T , typename A >
reference fcppt::container::raw_vector::object< T, A >::operator[] ( size_type  )
noexcept

◆ pop_back()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::pop_back ( )
noexcept

◆ push_back()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::push_back ( T const &  )

◆ reserve()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::reserve ( size_type  sz)

◆ resize()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::resize ( size_type  sz,
T const &  value 
)

◆ shrink_to_fit()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::shrink_to_fit ( )

◆ size()

template<typename T , typename A >
size_type fcppt::container::raw_vector::object< T, A >::size ( ) const
noexcept

◆ swap()

template<typename T , typename A >
void fcppt::container::raw_vector::object< T, A >::swap ( object< T, A > &  )
noexcept