Derecho
0.9
Distributed systems toolkit for RDMA
include
derecho
mutils-serialization
context_ptr.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <memory>
3
#include <type_traits>
4
5
namespace
mutils
{
6
7
template
<
typename
T>
8
struct
ContextDeleter
:
public
std::conditional_t<std::is_pod<T>::value,
9
ContextDeleter<void>,
10
std::default_delete<T> > {
11
};
12
13
template
<>
14
struct
ContextDeleter
<void> {
15
void
operator()
(...){}
16
};
17
18
19
template
<
typename
T>
20
using
context_ptr
= std::unique_ptr<T,ContextDeleter<T> >;
21
22
}
mutils::ContextDeleter
Definition:
context_ptr.hpp:8
mutils::context_ptr
std::unique_ptr< T, ContextDeleter< T > > context_ptr
Definition:
context_ptr.hpp:20
mutils
Definition:
Bytes.hpp:5
mutils::ContextDeleter< void >::operator()
void operator()(...)
Definition:
context_ptr.hpp:15
Generated on Sat Oct 26 2019 22:02:38 for Derecho by
1.8.13