ThirdParty
Ert
lib
include
ert
util
ert_unique_ptr.hpp
Go to the documentation of this file.
1
#ifndef ERT_UNIQUE_PTR
2
#define ERT_UNIQUE_PTR
3
4
#include <memory>
5
6
namespace
ERT
{
7
8
template
<
typename
T ,
void
(*F)(T*)>
9
struct
deleter
10
{
11
void
operator()
(T * arg)
const
{
12
F( arg );
13
}
14
};
15
16
template
<
typename
T ,
void
(*F)(T*)>
17
using
ert_unique_ptr
= std::unique_ptr<T, deleter<T,F> >;
18
19
}
20
21
#endif
22
23
ERT
Definition:
EclFilename.hpp:25
ERT::ert_unique_ptr
std::unique_ptr< T, deleter< T, F > > ert_unique_ptr
Definition:
ert_unique_ptr.hpp:17
ERT::deleter
Definition:
ert_unique_ptr.hpp:10
ERT::deleter::operator()
void operator()(T *arg) const
Definition:
ert_unique_ptr.hpp:11