alpaqa
1.0.0a8
Nonconvex constrained optimization
Loading...
Searching...
No Matches
alpaqa
include
alpaqa
util
noop-delete.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
alpaqa::util
{
4
5
/// Deleter for `std::unique_ptr` that just destructs the object, without
6
/// deallocating.
7
template
<
class
T>
8
struct
noop_delete
{
9
constexpr
noop_delete
() noexcept = default;
10
template <class U>
11
constexpr
noop_delete
(const
noop_delete
<U> &) noexcept {}
12
constexpr
void
operator()
(T *t)
const
noexcept
{ t->~T(); }
13
};
14
15
}
// namespace alpaqa::util
alpaqa::util
Definition:
check-dim.hpp:8
alpaqa::util::noop_delete
Deleter for std::unique_ptr that just destructs the object, without deallocating.
Definition:
noop-delete.hpp:8
alpaqa::util::noop_delete::operator()
constexpr void operator()(T *t) const noexcept
Definition:
noop-delete.hpp:12
alpaqa::util::noop_delete::noop_delete
constexpr noop_delete() noexcept=default
Generated by
1.9.6