Specialization of the class template reference_storage that is type-erased.
More...
#include <wpi/memory/allocator_storage.hpp>
Specialization of the class template reference_storage that is type-erased.
It is triggered by the tag type any_allocator. The specialization can store a reference to any allocator type.
◆ allocator_type
◆ reference_storage() [1/5]
template<class RawAllocator >
- Effects:
- Creates it from a reference to any stateful RawAllocator. It will store a pointer to this allocator object.
- Note
- The user has to take care that the lifetime of the reference does not exceed the allocator lifetime.
◆ reference_storage() [2/5]
template<class RawAllocator >
It will not store anything, only creates the allocator as needed.
- Requires:
- The
RawAllocator
is stateless.
◆ reference_storage() [3/5]
- Effects:
- Creates it from the internal base class for the type-erasure. Has the same effect as if the actual stored allocator were passed to the other constructor overloads.
- Note
- This constructor is used internally to avoid double-nesting.
◆ reference_storage() [4/5]
- Effects:
- Creates it from the internal base class for the type-erasure. Has the same effect as if the actual stored allocator were passed to the other constructor overloads.
- Note
- This constructor is used internally to avoid double-nesting.
◆ reference_storage() [5/5]
- Effects:
- Copies the
reference_storage
object. It only copies the pointer to the allocator.
◆ ~reference_storage()
◆ get_allocator()
- Returns:
- A reference to the allocator. The actual type is implementation-defined since it is the base class used in the type-erasure, but it provides the full RawAllocator member functions.
- Note
- There is no way to access any custom member functions of the allocator type.
◆ is_composable()
◆ operator=()
The documentation for this class was generated from the following file: