mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::ctx: Linkage for default and move semantics of ctx::context.
This commit is contained in:
parent
0eaa2fe211
commit
edbc0984c5
2 changed files with 26 additions and 4 deletions
|
@ -83,10 +83,10 @@ struct ircd::ctx::context
|
|||
context(function,
|
||||
const flags & = (flags)0);
|
||||
|
||||
context() = default;
|
||||
context(context &&) = default;
|
||||
context();
|
||||
context(context &&) noexcept;
|
||||
context(const context &) = delete;
|
||||
context &operator=(context &&) = default;
|
||||
context &operator=(context &&) noexcept;
|
||||
context &operator=(const context &) = delete;
|
||||
~context() noexcept;
|
||||
|
||||
|
|
24
ircd/ctx.cc
24
ircd/ctx.cc
|
@ -831,11 +831,19 @@ noexcept
|
|||
// ctx/context.h
|
||||
//
|
||||
|
||||
// Linkage here for default construction because ctx is internal.
|
||||
ircd::ctx::context::context()
|
||||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(const char *const &name,
|
||||
const size_t &stack_sz,
|
||||
const flags &flags,
|
||||
function func)
|
||||
:c{std::make_unique<ctx>(name, stack_sz, flags, ircd::ios)}
|
||||
:c
|
||||
{
|
||||
std::make_unique<ctx>(name, stack_sz, flags, ircd::ios)
|
||||
}
|
||||
{
|
||||
auto spawn
|
||||
{
|
||||
|
@ -920,6 +928,20 @@ ircd::ctx::context::context(function func,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(context &&other)
|
||||
noexcept
|
||||
:c{std::move(other.c)}
|
||||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context &
|
||||
ircd::ctx::context::operator=(context &&other)
|
||||
noexcept
|
||||
{
|
||||
std::swap(this->c, other.c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ircd::ctx::context::~context()
|
||||
noexcept
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue