diff --git a/src/test/pegtl/internal_constexpr.cpp b/src/test/pegtl/internal_constexpr.cpp
index 945066b2f..3c877f30c 100644
--- a/src/test/pegtl/internal_constexpr.cpp
+++ b/src/test/pegtl/internal_constexpr.cpp
@@ -2,6 +2,7 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
 
+#include <functional>
 #include <type_traits>
 
 #include "test.hpp"