mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:07:35 +00:00
AK: Allow NumericLimits.h to compile in a kernel context
We explicitly disallow floating point numbers during kernel compilation so we have to #ifdef out those parts here.
This commit is contained in:
parent
78412ee76d
commit
6cefb96e98
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,7 @@ struct NumericLimits<unsigned long long> {
|
||||||
static constexpr bool is_signed() { return false; }
|
static constexpr bool is_signed() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
template<>
|
template<>
|
||||||
struct NumericLimits<float> {
|
struct NumericLimits<float> {
|
||||||
static constexpr float min() { return __FLT_MIN__; }
|
static constexpr float min() { return __FLT_MIN__; }
|
||||||
|
@ -131,6 +132,7 @@ struct NumericLimits<long double> {
|
||||||
static constexpr long double max() { return __LDBL_MAX__; }
|
static constexpr long double max() { return __LDBL_MAX__; }
|
||||||
static constexpr bool is_signed() { return true; }
|
static constexpr bool is_signed() { return true; }
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue