From 6d01cf4e69e0303396af84b114f1a4ad3ee44815 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Sun, 30 Mar 2025 17:36:24 +0000 Subject: [PATCH] refactor(kernel): check for __cpp_impl_coroutine in Signed-off-by: EnderIce2 --- Kernel/include_std/coroutine | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Kernel/include_std/coroutine b/Kernel/include_std/coroutine index 8fdbc074..9f742d43 100644 --- a/Kernel/include_std/coroutine +++ b/Kernel/include_std/coroutine @@ -15,9 +15,14 @@ along with Fennix Kernel. If not, see . */ +#pragma once + +#ifndef __cpp_impl_coroutine +#error "kernel requires -fcoroutines" +#endif + namespace std { -#if __cpp_impl_coroutine namespace detail { template @@ -183,7 +188,4 @@ namespace std constexpr void await_suspend(coroutine_handle<>) const noexcept {} constexpr void await_resume() const noexcept {} }; -#else -#error "kernel requires -fcoroutines" -#endif }