libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::free_ptr< T > Struct Template Reference

A trivial class to use global free() to deallocate the memory using an RAII-style wrapper. More...

#include <deleter.hpp>

Public Types

typedef T element_type
 

Public Member Functions

constexpr free_ptr () noexcept(true)
 
constexpr free_ptr (element_type p) noexcept(true)
 
 free_ptr (free_ptr const &)=delete
 
 ~free_ptr () noexcept(true)
 

Public Attributes

const element_type ptr
 

Detailed Description

template<class T>
struct jmmcg::free_ptr< T >

A trivial class to use global free() to deallocate the memory using an RAII-style wrapper.

Definition at line 50 of file deleter.hpp.

Member Typedef Documentation

◆ element_type

template<class T >
typedef T jmmcg::free_ptr< T >::element_type

Definition at line 68 of file deleter.hpp.

Constructor & Destructor Documentation

◆ free_ptr() [1/3]

template<class T >
constexpr jmmcg::free_ptr< T >::free_ptr ( )
inlineconstexprnoexcept

Definition at line 72 of file deleter.hpp.

◆ free_ptr() [2/3]

template<class T >
constexpr jmmcg::free_ptr< T >::free_ptr ( element_type  p)
inlineexplicitconstexprnoexcept

Definition at line 75 of file deleter.hpp.

◆ free_ptr() [3/3]

template<class T >
jmmcg::free_ptr< T >::free_ptr ( free_ptr< T > const &  )
delete

◆ ~free_ptr()

template<class T >
jmmcg::free_ptr< T >::~free_ptr ( )
inlinenoexcept

Definition at line 79 of file deleter.hpp.

Member Data Documentation

◆ ptr

template<class T >
const element_type jmmcg::free_ptr< T >::ptr

Definition at line 70 of file deleter.hpp.


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