diff --git a/contrib/HighOrderMeshOptimizer/BoundaryLayerCurver.h b/contrib/HighOrderMeshOptimizer/BoundaryLayerCurver.h
index aabcec0ba89a11233af06dfbfa034ef76502a874..3ec7e9ea0c969d47c072e340eb35387c3cf27c61 100644
--- a/contrib/HighOrderMeshOptimizer/BoundaryLayerCurver.h
+++ b/contrib/HighOrderMeshOptimizer/BoundaryLayerCurver.h
@@ -31,6 +31,7 @@
 #define _BOUNDARYLAYERCURVER_H_
 
 //#include <map>
+#include <algorithm>
 #include <list>
 
 #include "MEdge.h"