From 8cace3f05003c6cb4d38c36890055f03151c2ad4 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 16 Oct 2026 02:39:56 +0800 Subject: Remove old code Signed-off-by: Richard Qin --- lib/ktl/include/cmath | 53 --------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 lib/ktl/include/cmath (limited to 'lib/ktl/include/cmath') diff --git a/lib/ktl/include/cmath b/lib/ktl/include/cmath deleted file mode 100644 index 13b8e6b..0000000 --- a/lib/ktl/include/cmath +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 The Fuchsia Authors -// -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/MIT - -#ifndef ZIRCON_KERNEL_LIB_KTL_INCLUDE_CMATH_ -#define ZIRCON_KERNEL_LIB_KTL_INCLUDE_CMATH_ - -// The kernel doesn't want this file but some libc++ headers we need -// wind up including it. They don't actually most of the math -// declarations except under #if conditions that aren't true. - -#include <__config> -#include - -_LIBCPP_BEGIN_NAMESPACE_STD - -// These are used in templates that won't ever be instantiated in kernel code. - -template -constexpr bool isinf(T&& x) { - static_assert(!is_same_v, "must not be instantiated in kernel code"); - return false; -} - -template -constexpr bool isnan(T&& x) { - static_assert(!is_same_v, "must not be instantiated in kernel code"); - return false; -} - -template -constexpr bool signbit(T&& x) { - static_assert(!is_same_v, "must not be instantiated in kernel code"); - return false; -} - -template -constexpr T frexp(T&& x, int* exponent) { - static_assert(!is_same_v, "must not be instantiated in kernel code"); - return x; -} - -template -constexpr auto ceil(T&& x) { - static_assert(!is_same_v, "must not be instantiated in kernel code"); - return x; -} - -_LIBCPP_END_NAMESPACE_STD - -#endif // ZIRCON_KERNEL_LIB_KTL_INCLUDE_CMATH_ -- cgit v1.2.3