#include <cstdlib>
#include <memory>
#include "gromacs/utility/smalloc.h"
|
template<typename T , void D = sfree_wrapper> |
using | gmx::unique_cptr = std::unique_ptr< T, functor_wrapper< T, D >> |
| unique_ptr which takes function pointer (has to return void) as template argument
|
|
typedef unique_cptr< void > | gmx::sfree_guard |
| Simple guard which calls sfree. See unique_cptr for details.
|
|
|
template<class T > |
void | gmx::free_wrapper (T *p) |
| Wrapper of standard library free(), to be used as unique_cptr deleter for memory allocated by malloc, e.g. by an external library such as TNG.
|
|
template<class T > |
void | gmx::sfree_wrapper (T *p) |
| sfree wrapper to be used as unique_cptr deleter
|
|
template<typename T , typename D > |
std::unique_ptr< T, D > | gmx::create_unique_with_deleter (T *t, D d) |
| Create unique_ptr with any deleter function or lambda.
|
|