4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::container::raw_vector::object< T, A > Class Template Reference

Detailed Description

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

A special vector class that can handle uninitialized memory.

Template Parameters
TA trivial 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.
 
const_pointer data () const noexcept
 Returns the pointer to the store.
 
pointer data_end () noexcept
 Returns the pointer to the end of the store.
 
const_pointer data_end () const noexcept
 Returns the pointer to the end of the store.
 
 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.
 
 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 = std::allocator<T>>
using fcppt::container::raw_vector::object< T, A >::allocator_type = A

◆ const_iterator

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

◆ const_pointer

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

◆ const_reference

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

◆ difference_type

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

◆ iterator

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

◆ pointer

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

◆ reference

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

◆ size_type

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

◆ value_type

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

Constructor & Destructor Documentation

◆ object() [1/10]

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

◆ object() [2/10]

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

◆ object() [3/10]

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

◆ object() [4/10]

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

◆ object() [5/10]

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

◆ object() [6/10]

template<typename T , typename A = std::allocator<T>>
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 = std::allocator<T>>
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 = std::allocator<T>>
fcppt::container::raw_vector::object< T, A >::object ( std::initializer_list< value_type > )

◆ object() [9/10]

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

◆ object() [10/10]

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

◆ ~object()

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

Member Function Documentation

◆ back() [1/2]

template<typename T , typename A = std::allocator<T>>
const_reference fcppt::container::raw_vector::object< T, A >::back ( ) const
nodiscardnoexcept

◆ back() [2/2]

template<typename T , typename A = std::allocator<T>>
reference fcppt::container::raw_vector::object< T, A >::back ( )
nodiscardnoexcept

◆ begin() [1/2]

template<typename T , typename A = std::allocator<T>>
const_iterator fcppt::container::raw_vector::object< T, A >::begin ( ) const
nodiscardnoexcept

◆ begin() [2/2]

template<typename T , typename A = std::allocator<T>>
iterator fcppt::container::raw_vector::object< T, A >::begin ( )
nodiscardnoexcept

◆ capacity()

template<typename T , typename A = std::allocator<T>>
size_type fcppt::container::raw_vector::object< T, A >::capacity ( ) const
nodiscardnoexcept

◆ clear()

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

◆ data() [1/2]

template<typename T , typename A = std::allocator<T>>
const_pointer fcppt::container::raw_vector::object< T, A >::data ( ) const
nodiscardnoexcept

Returns the pointer to the store.

◆ data() [2/2]

template<typename T , typename A = std::allocator<T>>
pointer fcppt::container::raw_vector::object< T, A >::data ( )
nodiscardnoexcept

Returns the pointer to the store.

◆ data_end() [1/2]

template<typename T , typename A = std::allocator<T>>
const_pointer fcppt::container::raw_vector::object< T, A >::data_end ( ) const
nodiscardnoexcept

Returns the pointer to the end of the store.

Equal to data() + size().

◆ data_end() [2/2]

template<typename T , typename A = std::allocator<T>>
pointer fcppt::container::raw_vector::object< T, A >::data_end ( )
nodiscardnoexcept

Returns the pointer to the end of the store.

Equal to data() + size().

◆ empty()

template<typename T , typename A = std::allocator<T>>
bool fcppt::container::raw_vector::object< T, A >::empty ( ) const
nodiscardnoexcept

◆ end() [1/2]

template<typename T , typename A = std::allocator<T>>
const_iterator fcppt::container::raw_vector::object< T, A >::end ( ) const
nodiscardnoexcept

◆ end() [2/2]

template<typename T , typename A = std::allocator<T>>
iterator fcppt::container::raw_vector::object< T, A >::end ( )
nodiscardnoexcept

◆ erase() [1/2]

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

◆ erase() [2/2]

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

◆ front() [1/2]

template<typename T , typename A = std::allocator<T>>
const_reference fcppt::container::raw_vector::object< T, A >::front ( ) const
nodiscardnoexcept

◆ front() [2/2]

template<typename T , typename A = std::allocator<T>>
reference fcppt::container::raw_vector::object< T, A >::front ( )
nodiscardnoexcept

◆ get_allocator()

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

◆ insert() [1/3]

template<typename T , typename A = std::allocator<T>>
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 = std::allocator<T>>
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 = std::allocator<T>>
iterator fcppt::container::raw_vector::object< T, A >::insert ( iterator position,
T const & t )

◆ operator=()

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

template<typename T , typename A = std::allocator<T>>
reference fcppt::container::raw_vector::object< T, A >::operator[] ( size_type )
nodiscardnoexcept

◆ pop_back()

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

◆ push_back()

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

◆ reserve()

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

◆ resize()

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

◆ shrink_to_fit()

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

◆ size()

template<typename T , typename A = std::allocator<T>>
size_type fcppt::container::raw_vector::object< T, A >::size ( ) const
nodiscardnoexcept

◆ swap()

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