diff --git a/gtf_interval_tree.h b/gtf_interval_tree.h
index 99221a8..56ce1f6 100644
--- a/gtf_interval_tree.h
+++ b/gtf_interval_tree.h
@@ -29,6 +29,7 @@
 #include <iostream>
 #include <memory>
 #include <cassert>
+#include <limits>
 
 template <class Scalar, typename Value>
 class gtfInterval {
