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
6namespace 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
Definition: EclFilename.hpp:25
std::unique_ptr< T, deleter< T, F > > ert_unique_ptr
Definition: ert_unique_ptr.hpp:17
Definition: ert_unique_ptr.hpp:10
void operator()(T *arg) const
Definition: ert_unique_ptr.hpp:11