From 1d7b44cc26d8cad7434e646254b6ec0dbc150972 Mon Sep 17 00:00:00 2001 From: "harry.cpp" Date: Thu, 6 Jun 2024 16:48:47 +0200 Subject: [PATCH] Quick fix for std::binary_function not being available in v143 --- build/BuildWindowsTask.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/BuildWindowsTask.cs b/build/BuildWindowsTask.cs index 57fb069..1e598d4 100644 --- a/build/BuildWindowsTask.cs +++ b/build/BuildWindowsTask.cs @@ -14,6 +14,10 @@ public override void Run(BuildContext context) // Disable openmp so there is no dependency on VCOMP140.dll context.ReplaceTextInFiles("freeimage/**/*LibRawLite.2017.vcxproj", "true", "false"); + // Replace std::binary_function with our own as its been deprecated + context.ReplaceTextInFiles("freeimage/Source/OpenEXR/IlmImf/ImfAttribute.cpp", "std::binary_function", "binary_function"); + context.ReplaceRegexInFiles("freeimage/Source/OpenEXR/IlmImf/ImfAttribute.cpp", "namespace {.*", "namespace { template struct binary_function { using first_argument_type = Arg1; using second_argument_type = Arg2; using result_type = Result; };"); + MSBuildSettings buildSettings = new() { Verbosity = Verbosity.Normal,