From c68f024b35e259dc78b0916cf2d79e9390e1df40 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Wed, 8 Sep 2021 12:57:27 -0400 Subject: [PATCH] SWDEV-1 - Fix Windows build std: :mem_fun() is removed in c++17. Simplify logic to not require it. Change-Id: Ic9a4753b48dd13fcb20cd5b90ff73c3df3211b9f --- rocclr/platform/command.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rocclr/platform/command.hpp b/rocclr/platform/command.hpp index abb7f3b96a..e30d2d22cc 100644 --- a/rocclr/platform/command.hpp +++ b/rocclr/platform/command.hpp @@ -977,7 +977,9 @@ class NativeFnCommand : public Command { ~NativeFnCommand() { delete[] args_; } void releaseResources() { - std::for_each(memObjects_.begin(), memObjects_.end(), std::mem_fun(&Memory::release)); + for (const auto& memObject: memObjects_) { + memObject->release(); + } Command::releaseResources(); }