cpp-sdl2
C++ header-only SDL2 wrapper
sdl::simd::allocator< T > Struct Template Reference

Allocator usable with standard containers. More...

#include <simd.hpp>

Classes

struct  rebind
 

Public Types

using value_type = T
 

Public Member Functions

constexpr allocator () noexcept=default
 
template<typename U >
constexpr allocator (allocator< U >) noexcept
 
T * allocate (std::size_t size)
 
void deallocate (T *ptr, [[maybe_unused]] std::size_t size) noexcept
 

Friends

constexpr bool operator== (allocator, allocator) noexcept
 
constexpr bool operator!= (allocator, allocator) noexcept
 

Detailed Description

template<typename T>
struct sdl::simd::allocator< T >

Allocator usable with standard containers.

Definition at line 34 of file simd.hpp.

Member Typedef Documentation

◆ value_type

template<typename T>
using sdl::simd::allocator< T >::value_type = T

Definition at line 36 of file simd.hpp.

Constructor & Destructor Documentation

◆ allocator() [1/2]

template<typename T>
constexpr sdl::simd::allocator< T >::allocator ( )
defaultnoexcept

◆ allocator() [2/2]

template<typename T>
template<typename U >
constexpr sdl::simd::allocator< T >::allocator ( allocator< U >  )
inlineexplicitnoexcept

Definition at line 47 of file simd.hpp.

Member Function Documentation

◆ allocate()

template<typename T>
T* sdl::simd::allocator< T >::allocate ( std::size_t  size)
inline

Definition at line 51 of file simd.hpp.

References sdl::simd::alloc(), and sdl::simd::mem.

Referenced by sdl::simd::make_shared(), and sdl::simd::make_unique().

◆ deallocate()

template<typename T>
void sdl::simd::allocator< T >::deallocate ( T *  ptr,
[[maybe_unused] ] std::size_t  size 
)
inlinenoexcept

Definition at line 60 of file simd.hpp.

References sdl::simd::free().

Friends And Related Function Documentation

◆ operator!=

template<typename T>
constexpr bool operator!= ( allocator< T >  ,
allocator< T >   
)
friend

Definition at line 63 of file simd.hpp.

◆ operator==

template<typename T>
constexpr bool operator== ( allocator< T >  ,
allocator< T >   
)
friend

Definition at line 62 of file simd.hpp.


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