guanaqo
1.0.0-alpha.26
Utilities for scientific software
Loading...
Searching...
No Matches
noop-delete.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/// @file
4
/// @ingroup memory
5
/// Deleter that skips deallocation.
6
7
namespace
guanaqo
{
8
9
/// Deleter for `std::unique_ptr` that just destructs the object, without
10
/// deallocating.
11
/// @ingroup memory
12
template
<
class
T>
13
struct
noop_delete
{
14
constexpr
noop_delete
() noexcept = default;
15
template <class U>
16
constexpr
noop_delete
(const
noop_delete
<U> &) noexcept {}
17
constexpr
void
operator()
(T *t)
const
noexcept
{ t->~T(); }
18
};
19
20
}
// namespace guanaqo
guanaqo
Definition
blas-interface.hpp:9
guanaqo::noop_delete::noop_delete
constexpr noop_delete() noexcept=default
guanaqo::noop_delete::operator()
constexpr void operator()(T *t) const noexcept
Definition
noop-delete.hpp:17
include
guanaqo
noop-delete.hpp
Generated on
for guanaqo by
1.16.1