Просмотр исходного кода

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.
Andreas Kling 5 лет назад
Родитель
Сommit
6cefb96e98
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      AK/NumericLimits.h

+ 2 - 0
AK/NumericLimits.h

@@ -111,6 +111,7 @@ struct NumericLimits<unsigned long long> {
     static constexpr bool is_signed() { return false; }
 };
 
+#ifndef KERNEL
 template<>
 struct NumericLimits<float> {
     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 bool is_signed() { return true; }
 };
+#endif
 
 }