vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
533 stars 89 forks source link

error: ‘transform’ is not a member of ‘std’ #401

Closed inferrna closed 8 months ago

inferrna commented 9 months ago
In file included from /usr/include/boost/process/detail/basic_cmd.hpp:14,
                 from /usr/include/boost/process/args.hpp:33,
                 from /usr/include/boost/process.hpp:22,
                 from /media/Data/UnClear/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp:2:
/usr/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<wchar_t> > boost::process::detail::char_converter<wchar_t, std::vector<std::__cxx11::basic_string<char> > >::conv(const std::vector<std::__cxx11::basic_string<char> >&)’:
/usr/include/boost/process/detail/traits/wchar_t.hpp:150:14: error: ‘transform’ is not a member of ‘std’
  150 |         std::transform(in.begin(), in.end(), ret.begin(),

My boost version is 1_77. I fixed the error with a patch below, after that all compiled fine.

diff --git a/LspCpp/src/lsp/ParentProcessWatcher.cpp b/LspCpp/src/lsp/ParentProcessWatcher.cpp
index 02c61e67..c698a315 100644
--- a/LspCpp/src/lsp/ParentProcessWatcher.cpp
+++ b/LspCpp/src/lsp/ParentProcessWatcher.cpp
@@ -1,4 +1,5 @@
 #include "LibLsp/lsp/ParentProcessWatcher.h"
+#include <algorithm>
 #include <boost/process.hpp>

 #ifdef _WIN32
johncbowman commented 8 months ago

Thanks; applied in commit 97af5c4c4d318c8c8642bf596506b79936312c36.