From 6516c9d07db42beba5ba9c0c41a33925794a249c Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 6 Jun 2023 07:44:42 -0400
Subject: [PATCH] SL-18837: NamedTempFile back to std::function, use
 boost::phoenix <<

It seems the problem addressed by aab769e wasn't some synergy between
Boost.Phoenix and Boost.Function, but rather the lack of a Phoenix header file
introducing operator<<().
---
 indra/llcommon/tests/llleap_test.cpp        | 1 +
 indra/llcommon/tests/llsdserialize_test.cpp | 1 +
 indra/test/namedtempfile.h                  | 4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp
index 99fd073dd2c..0c91db3e241 100644
--- a/indra/llcommon/tests/llleap_test.cpp
+++ b/indra/llcommon/tests/llleap_test.cpp
@@ -19,6 +19,7 @@
 // external library headers
 #include <boost/assign/list_of.hpp>
 #include <boost/phoenix/core/argument.hpp>
+#include <boost/phoenix/operator/bitwise.hpp> // operator<<()
 // other Linden headers
 #include "../test/lltut.h"
 #include "../test/namedtempfile.h"
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index d7c11c5021a..a0b85195082 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -50,6 +50,7 @@ typedef U32 uint32_t;
 #include "boost/bind.hpp"
 #include "boost/phoenix/bind/bind_function.hpp"
 #include "boost/phoenix/core/argument.hpp"
+#include <boost/phoenix/operator/bitwise.hpp>
 using namespace boost::phoenix;
 
 #include "../llsd.h"
diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index acfc048b7a3..84b62a09457 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -15,10 +15,10 @@
 #include "llerror.h"
 #include "stringize.h"
 #include <string>
-#include <boost/function.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
 #include <boost/noncopyable.hpp>
+#include <functional>
 #include <iostream>
 #include <sstream>
 #include <string_view>
@@ -50,7 +50,7 @@ class NamedTempFile: public boost::noncopyable
     // Function that accepts an ostream ref and (presumably) writes stuff to
     // it, e.g.:
     // (boost::phoenix::placeholders::arg1 << "the value is " << 17 << '\n')
-    typedef boost::function<void(std::ostream&)> Streamer;
+    typedef std::function<void(std::ostream&)> Streamer;
 
     NamedTempFile(const std::string_view& pfx,
                   const Streamer& func,
-- 
GitLab