0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::ctx: Move the internal ctx struct ctor out of class.

This commit is contained in:
Jason Volk 2019-09-22 16:44:34 -07:00
parent a20659b1d8
commit 4a51b3382c
2 changed files with 14 additions and 8 deletions

View file

@ -57,7 +57,19 @@ ircd::ctx::ctx::ios_desc
"ircd::ctx::ctx"
};
// linkage for dtor
/// Internal context struct ctor
ircd::ctx::ctx::ctx(const string_view &name,
const size_t &stack_max,
const context::flags &flags,
boost::asio::io_service &ios)
:name{name}
,flags{flags}
,strand{ios}
,alarm{ios}
,stack{stack_max}
{
}
ircd::ctx::ctx::~ctx()
noexcept
{

View file

@ -81,13 +81,7 @@ struct ircd::ctx::ctx
ctx(const string_view &name = "<noname>"_sv,
const size_t &stack_max = DEFAULT_STACK_SIZE,
const context::flags &flags = (context::flags)0U,
boost::asio::io_service &ios = ircd::ios::get())
:name{name}
,flags{flags}
,strand{ios}
,alarm{ios}
,stack{stack_max}
{}
boost::asio::io_service &ios = ircd::ios::get());
ctx(ctx &&) = delete;
ctx(const ctx &) = delete;