ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA Struct Reference

Description:

template<typename T, typename TAllocator = HeapAllocator>
struct alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA

Fields if TAllocator is default-constructible (e.g., HeapAllocator).

Definition at line 58 of file sharedval.inl.

Collaboration diagram for alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA:
[legend]

Public Static Method Index:

static constexpr TAllocator GetAllocator () noexcept
 

Public Field Index:

custom
 The instance of the custom type.
 
std::atomic< unsigned int > refCount
 The reference counter used to implement the std::shared_ptr behavior.
 

Public Method Index:

template<typename... TArgs, typename TRequires = TAllocator>
requires std::default_initializable<TRequires>
 FieldMembersNoTA (TArgs &&... args)
 

Field Details:

◆ custom

template<typename T, typename TAllocator = HeapAllocator>
T alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA::custom

The instance of the custom type.

Definition at line 61 of file sharedval.inl.

◆ refCount

template<typename T, typename TAllocator = HeapAllocator>
std::atomic<unsigned int> alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA::refCount

The reference counter used to implement the std::shared_ptr behavior.

Definition at line 64 of file sharedval.inl.

Constructor(s) / Destructor Details:

◆ FieldMembersNoTA()

template<typename T, typename TAllocator = HeapAllocator>
template<typename... TArgs, typename TRequires = TAllocator>
requires std::default_initializable<TRequires>
alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA::FieldMembersNoTA ( TArgs &&... args)
inline

Alternative constructor missing the allocator instance. This is used only with allocators that are default-constructible (like HeapAllocator is).

Template Parameters
TArgsThe argument types used for constructing T.
TRequiresDefaulted template parameter. Must not be specified.
Parameters
argsThe arguments for constructing T.

Definition at line 74 of file sharedval.inl.

Method Details:

◆ GetAllocator()

template<typename T, typename TAllocator = HeapAllocator>
constexpr TAllocator alib::containers::SharedVal< T, TAllocator >::FieldMembersNoTA::GetAllocator ( )
inlinestaticconstexprnoexcept
Returns
A heap allocator value.

Definition at line 79 of file sharedval.inl.


The documentation for this struct was generated from the following file: