From https://github.com/calf-studio-gear/calf/pull/331/commits/849a0b589fb86cb4b9869738b270fd24859bd23b Mon Sep 17 00:00:00 2001 From: Violet Purcell Date: Thu, 21 Sep 2023 18:16:35 -0400 Subject: [PATCH] Replace use of std::bind2nd with std::bind std::bind2nd was deprecated in C++11 and removed in C++17. Remove usage of it and replace with std::bind. Signed-off-by: Violet Purcell --- a/src/calf/orfanidis_eq.h +++ b/src/calf/orfanidis_eq.h @@ -748,7 +748,7 @@ private: std::vector v = landen(k, tol); std::transform(v.begin(), v.end(), v.begin(), - bind2nd(std::plus(), 1.0)); + bind(std::plus(), 1.0, std::placeholders::_1)); K = std::accumulate(v.begin(), v.end(), 1, std::multiplies()) * M_PI/2.0; @@ -764,7 +764,7 @@ private: std::vector vp = landen(kp, tol); std::transform(vp.begin(), vp.end(), vp.begin(), - bind2nd(std::plus(), 1.0)); + bind(std::plus(), 1.0, std::placeholders::_1)); Kprime = std::accumulate(vp.begin(), vp.end(), 1.0, std::multiplies()) * M_PI/2.0; -- 2.42.0