diff --git a/tutorial/c++/t8.cpp b/tutorial/c++/t8.cpp
index 8332a2b7e3445b889c63f3ccc7680d30dc38b49b..132333fedb94c869f583e9e00526d19b53507283 100644
--- a/tutorial/c++/t8.cpp
+++ b/tutorial/c++/t8.cpp
@@ -6,6 +6,7 @@
 //
 // -----------------------------------------------------------------------------
 
+#include <algorithm>
 #include <gmsh.h>
 
 // In addition to creating geometries and meshes, the C++ API can also be used