TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
TVAlloc< T, Alloc > Class Template Reference

#include <TVAlloc.h>

Inheritance diagram for TVAlloc< T, Alloc >:
[legend]
Collaboration diagram for TVAlloc< T, Alloc >:
[legend]

Classes

struct  rebind

Public Member Functions

template<typename U>
void construct (U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
template<typename U, typename... Args>
void construct (U *ptr, Args &&... args)

Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class TVAlloc< T, Alloc >

Allocator adaptor that intercepts the 'construct' calls to convert value initialization into default initialization Written by Casey Carter (@codercasey) Taken from https://hackingcpp.com/cpp/recipe/uninitialized_numeric_array.html

This allows "std::vector<T>(30)" to only allocate, not initialize, the data.

Definition at line 26 of file TVAlloc.h.

Member Function Documentation

◆ construct() [1/2]

template<typename T, typename Alloc = std::allocator<T>>
template<typename U>
void TVAlloc< T, Alloc >::construct ( U * ptr)
inlinenoexcept

Definition at line 42 of file TVAlloc.h.

◆ construct() [2/2]

template<typename T, typename Alloc = std::allocator<T>>
template<typename U, typename... Args>
void TVAlloc< T, Alloc >::construct ( U * ptr,
Args &&... args )
inline

Definition at line 49 of file TVAlloc.h.


The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Math/TVAlloc.h