purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::detail::SecureAllocator< T > Class Template Reference

Allocator that clears an allocation immediately before releasing it. More...

#include <secret.hpp>

Data Structures

struct  rebind

Public Types

using value_type = T
using is_always_equal = std::true_type
using propagate_on_container_move_assignment = std::true_type

Public Member Functions

 SecureAllocator () noexcept=default
template<typename U>
 SecureAllocator (const SecureAllocator< U > &) noexcept
T * allocate (std::size_t count)
void deallocate (T *data, std::size_t count) noexcept

Detailed Description

template<typename T>
class purify::detail::SecureAllocator< T >

Standard containers destroy their elements before calling deallocate(). The element bytes remain addressable through the allocation at that point, so the allocator can clear both live-container storage and superseded storage from a vector reallocation.

Definition at line 40 of file secret.hpp.

Member Typedef Documentation

◆ is_always_equal

template<typename T>
using purify::detail::SecureAllocator< T >::is_always_equal = std::true_type

Definition at line 43 of file secret.hpp.

◆ propagate_on_container_move_assignment

template<typename T>
using purify::detail::SecureAllocator< T >::propagate_on_container_move_assignment = std::true_type

Definition at line 44 of file secret.hpp.

◆ value_type

template<typename T>
using purify::detail::SecureAllocator< T >::value_type = T

Definition at line 42 of file secret.hpp.

Constructor & Destructor Documentation

◆ SecureAllocator() [1/2]

template<typename T>
purify::detail::SecureAllocator< T >::SecureAllocator ( )
defaultnoexcept

◆ SecureAllocator() [2/2]

template<typename T>
template<typename U>
purify::detail::SecureAllocator< T >::SecureAllocator ( const SecureAllocator< U > & )
inlinenoexcept

Definition at line 49 of file secret.hpp.

Member Function Documentation

◆ allocate()

template<typename T>
T * purify::detail::SecureAllocator< T >::allocate ( std::size_t count)
inlinenodiscard

Definition at line 51 of file secret.hpp.

◆ deallocate()

template<typename T>
void purify::detail::SecureAllocator< T >::deallocate ( T * data,
std::size_t count )
inlinenoexcept

Definition at line 55 of file secret.hpp.


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