Skip to content

Commit

Permalink
Quick fix for std::binary_function not being available in v143
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Jun 6, 2024
1 parent 7a299f7 commit 1d7b44c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/BuildWindowsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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", "<OpenMPSupport>true</OpenMPSupport>", "<OpenMPSupport>false</OpenMPSupport>");

// 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<class Arg1, class Arg2, class Result> struct binary_function { using first_argument_type = Arg1; using second_argument_type = Arg2; using result_type = Result; };");

MSBuildSettings buildSettings = new()
{
Verbosity = Verbosity.Normal,
Expand Down

0 comments on commit 1d7b44c

Please sign in to comment.