# Compilation error: #include \<limits\> required in several files

**URL:** <https://discourse.vtk.org/t/compilation-error-include-limits-required-in-several-files/6496>\
**Category:** Development\
**Created:** [August 29, 2021, 4:07pm UTC](https://discourse.vtk.org/t/compilation-error-include-limits-required-in-several-files/6496 "2021-08-29T16:07:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dariop](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dariop/32/3862_2.png) [@dariop](https://discourse.vtk.org/u/dariop)\
**Post date:** [August 29, 2021, 4:07pm UTC](https://discourse.vtk.org/t/compilation-error-include-limits-required-in-several-files/6496/1 "2021-08-29T16:07:31Z")

</div>

Hi, in order to compile v9.0.3 on ArchLinux with GCC 11.1.0 I had to add `#include <limits>` in the following files:

```auto
Common/Core/vtkGenericDataArray.h
Common/Core/vtkGenericDataArrayLookupHelper.h
Common/DataModel/vtkPiecewiseFunction.cxx
Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
Rendering/Core/vtkColorTransferFunction.cxx

```

The compilation otherwise fails with errors such as:

```auto
Common/Core/vtkGenericDataArrayLookupHelper.h:52:26: error: ‘numeric_limits’ is not a member of ‘std’
   52 | return has_NaN<T, std::numeric_limits<T>::has_quiet_NaN>::isnan(x);

```

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [August 29, 2021, 6:27pm UTC](https://discourse.vtk.org/t/compilation-error-include-limits-required-in-several-files/6496/2 "2021-08-29T18:27:07Z")

</div>

Looks like this was [fixed in master in February](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7611) but the fix wasn’t backported to the release branch.
