From 399e99a98728a7cdf7344654818943c6e223537a Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Fri, 11 Oct 2024 18:58:01 +0200 Subject: [PATCH] modules/grpc: fix add_header std::tolower is not an addressible function, the intended way to use it within a lambda. See the following for more information: https://devblogs.microsoft.com/oldnewthing/20241007-00/?p=110345 https://en.cppreference.com/w/cpp/string/byte/tolower Signed-off-by: Szilard Parrag --- modules/grpc/common/grpc-dest.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/grpc/common/grpc-dest.hpp b/modules/grpc/common/grpc-dest.hpp index a95387d33..4667269aa 100644 --- a/modules/grpc/common/grpc-dest.hpp +++ b/modules/grpc/common/grpc-dest.hpp @@ -110,7 +110,11 @@ class DestDriver void add_header(std::string name, std::string value) { - std::transform(name.begin(), name.end(), name.begin(), ::tolower); + std::transform(name.begin(), name.end(), name.begin(), + [](auto c) + { + return ::tolower(c); + }); this->headers.push_back(std::make_pair(name, value)); }