0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 01:59:33 +02:00

ircd::ctx::uninterruptible: Add defaulted runtime bool construction.

This commit is contained in:
Jason Volk 2020-05-18 18:43:17 -07:00
parent 92a4322f3a
commit ce3a57bfce

View file

@ -32,7 +32,7 @@ struct ircd::ctx::this_ctx::uninterruptible
bool theirs;
uninterruptible();
uninterruptible(const bool & = true);
uninterruptible(uninterruptible &&) = delete;
uninterruptible(const uninterruptible &) = delete;
~uninterruptible() noexcept(false);
@ -47,7 +47,7 @@ struct ircd::ctx::this_ctx::uninterruptible::nothrow
{
bool theirs;
nothrow() noexcept;
nothrow(const bool & = true) noexcept;
nothrow(nothrow &&) = delete;
nothrow(const nothrow &) = delete;
~nothrow() noexcept;
@ -58,13 +58,13 @@ struct ircd::ctx::this_ctx::uninterruptible::nothrow
//
inline
ircd::ctx::this_ctx::uninterruptible::uninterruptible()
ircd::ctx::this_ctx::uninterruptible::uninterruptible(const bool &ours)
:theirs
{
interruptible(cur())
}
{
interruptible(false);
interruptible(!ours);
}
inline
@ -79,14 +79,14 @@ noexcept(false)
//
inline
ircd::ctx::this_ctx::uninterruptible::nothrow::nothrow()
ircd::ctx::this_ctx::uninterruptible::nothrow::nothrow(const bool &ours)
noexcept
:theirs
{
interruptible(cur())
}
{
interruptible(false, std::nothrow);
interruptible(!ours, std::nothrow);
}
inline