[libc++] Granularize <functional> includes

Reviewed By: Mordante, #libc

Spies: libcxx-commits, miyuki

Differential Revision: https://reviews.llvm.org/D123912

NOKEYCHECK=True
GitOrigin-RevId: faef447e72a5c63dfb12bb7b02d44c3c916d31cd
diff --git a/include/regex b/include/regex
index 456f34d..5d07874 100644
--- a/include/regex
+++ b/include/regex
@@ -763,6 +763,7 @@
 */
 
 #include <__algorithm/find.h>
+#include <__algorithm/search.h>
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 #include <__iterator/wrap_iter.h>