7#include "../utility/utility.hpp"
8#include "../macros.hpp"
36[[
nodiscard]]
constexpr callback_flags operator|(callback_flags
const &lhs, callback_flags
const &rhs)
noexcept
38 hi_assert((std::to_underlying(lhs) & 0xff) == 0
or (std::to_underlying(rhs) & 0xff) == 0);
39 return static_cast<callback_flags
>(std::to_underlying(lhs) | std::to_underlying(rhs));
42[[
nodiscard]]
constexpr bool is_once(callback_flags
const &rhs)
noexcept
44 return to_bool(std::to_underlying(rhs) & std::to_underlying(callback_flags::once));
47[[
nodiscard]]
constexpr bool is_synchronous(callback_flags
const& rhs)
noexcept
49 return to_bool((std::to_underlying(rhs) & 0xff) == std::to_underlying(callback_flags::synchronous));
52[[
nodiscard]]
constexpr bool is_local(callback_flags
const& rhs)
noexcept
54 return to_bool((std::to_underlying(rhs) & 0xff) == std::to_underlying(callback_flags::local));
57[[
nodiscard]]
constexpr bool is_main(callback_flags
const& rhs)
noexcept
59 return to_bool((std::to_underlying(rhs) & 0xff) == std::to_underlying(callback_flags::main));
62[[
nodiscard]]
constexpr bool is_timer(callback_flags
const& rhs)
noexcept
64 return to_bool((std::to_underlying(rhs) & 0xff) == std::to_underlying(callback_flags::timer));
DOXYGEN BUG.
Definition algorithm.hpp:16
callback_flags
Definition callback_flags.hpp:14
@ synchronous
Call the function synchronously.
@ timer
Call the function asynchronously from the timer thread's loop.
@ once
Call the function once, then automatically unsubscribe.
@ local
Call the function asynchronously from the current thread's loop.
@ main
Call the function asynchronously from the main thread's loop.
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377