template<
typename T,
bool = (std::is_trivially_copy_constructible<T>::value) && (std::is_trivially_move_constructible<T>::value) && std::is_trivially_destructible<T>::value>
class ROOT::Internal::VecOps::SmallVectorTemplateBase< T, bool >
SmallVectorTemplateBase<TriviallyCopyable = false> - This is where we put method implementations that are designed to work with non-trivial T's.
We approximate is_trivially_copyable with trivial move/copy construction and trivial destruction. While the standard doesn't specify that you're allowed copy these types with memcpy, there is no way for the type to observe this. This catches the important case of std::pair<POD, POD>, which is not trivially assignable.
Definition at line 330 of file RVec.hxx.
|
| | SmallVectorTemplateBase (size_t Size) |
| |
| void | grow (size_t MinSize=0) |
| | Grow the allocated memory (without initializing new elements), doubling the size of the allocated memory.
|
| |
| void | grow_pod (size_t MinSize, size_t TSize) |
| |
| void | grow_pod (void *FirstEl, size_t MinSize, size_t TSize) |
| | This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication.
|
| |
| bool | isSmall () const |
| | Return true if this is a smallvector which has not had dynamic memory allocated for it.
|
| |
| bool | Owns () const |
| | If false, the RVec is in "memory adoption" mode, i.e. it is acting as a view on a memory buffer it does not own.
|
| |
| void | resetToSmall () |
| | Put this vector in a state of being small.
|
| |
|
| static void | destroy_range (T *S, T *E) |
| |
| static void | report_at_maximum_capacity () |
| | Report that this vector is already at maximum capacity.
|
| |
| static void | report_size_overflow (size_t MinSize) |
| | Report that MinSize doesn't fit into this vector's size type.
|
| |
| static constexpr size_t | SizeTypeMax () |
| | The maximum value of the Size_T used.
|
| |
| template<typename It1 , typename It2 > |
| static void | uninitialized_copy (It1 I, It1 E, It2 Dest) |
| | Copy the range [I, E) onto the uninitialized memory starting with "Dest", constructing elements as needed.
|
| |
| template<typename It1 , typename It2 > |
| static void | uninitialized_move (It1 I, It1 E, It2 Dest) |
| | Move the range [I, E) into the uninitialized memory starting with "Dest", constructing elements as needed.
|
| |
| void ROOT::Internal::VecOps::SmallVectorBase::set_size |
( |
size_t | N | ) |
|
|
inlineinherited |
Set the array size to N, which the current array must have enough capacity for.
This does not construct or destroy any elements in the vector.
Clients can use this in conjunction with capacity() to write past the end of the buffer when they know that more elements are available, and only update the size later. This avoids the cost of value initializing elements which will only be overwritten.
Definition at line 190 of file RVec.hxx.