mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add NumericLimits specialization for char.
This is yet another bug because of the 'char'/'signed char'/'unsigned char' shit.
This commit is contained in:
parent
71b7ef0992
commit
f221a95a71
Notes:
sideshowbarker
2024-07-19 02:08:04 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/f221a95a717 Pull-request: https://github.com/SerenityOS/serenity/pull/3640
1 changed files with 7 additions and 0 deletions
|
@ -48,6 +48,13 @@ struct NumericLimits<signed char> {
|
|||
static constexpr bool is_signed() { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct NumericLimits<char> {
|
||||
static constexpr char min() { return -__SCHAR_MAX__ - 1; }
|
||||
static constexpr char max() { return __SCHAR_MAX__; }
|
||||
static constexpr bool is_signed() { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct NumericLimits<short> {
|
||||
static constexpr short min() { return -__SHRT_MAX__ - 1; }
|
||||
|
|
Loading…
Reference in a new issue