refactor(kernel): check for __cpp_impl_coroutine in <coroutine>

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-03-30 17:36:24 +00:00
parent ffd992cd74
commit 6d01cf4e69
Signed by: enderice2
GPG Key ID: FEB6B8A8507BA62E

View File

@ -15,9 +15,14 @@
along with Fennix Kernel. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef __cpp_impl_coroutine
#error "kernel requires -fcoroutines"
#endif
namespace std
{
#if __cpp_impl_coroutine
namespace detail
{
template <class, class...>
@ -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
}