0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::util: Prevent section creation std::function wrapper in ~unwind.

This commit is contained in:
Jason Volk 2019-10-08 14:49:37 -07:00
parent 736f8c6ad0
commit b82123e09a

View file

@ -38,7 +38,7 @@ struct ircd::util::unwind
unwind(const unwind &) = delete;
unwind &operator=(const unwind &) = delete;
~unwind() noexcept
~unwind() noexcept __attribute__((always_inline))
{
func();
}
@ -60,7 +60,7 @@ struct ircd::util::unwind::nominal
:func{std::forward<F>(func)}
{}
~nominal() noexcept
~nominal() noexcept __attribute__((always_inline))
{
if(likely(!std::uncaught_exceptions()))
func();
@ -87,7 +87,7 @@ struct ircd::util::unwind::exceptional
:func{std::forward<F>(func)}
{}
~exceptional() noexcept
~exceptional() noexcept __attribute__((always_inline))
{
if(unlikely(std::uncaught_exceptions()))
func();