diff --git a/src/lib/tls/tls_session_manager_memory.cpp b/src/lib/tls/tls_session_manager_memory.cpp index e0f9c5246c6..143a1dbb4b6 100644 --- a/src/lib/tls/tls_session_manager_memory.cpp +++ b/src/lib/tls/tls_session_manager_memory.cpp @@ -67,7 +67,9 @@ std::vector Session_Manager_In_Memory::find_some(const Serv lock_guard_type lk(mutex()); std::vector found_sessions; - auto t = m_sessions | std::views::transform([](const auto& e) { return e.second; }); + std::vector t; + t.reserve(m_sessions.size()); + std::transform(m_sessions.begin(), m_sessions.end(), std::back_inserter(t), [](const auto& e) { return e.second; }); std::copy_if(t.begin(), t.end(), std::back_inserter(found_sessions), [&](const auto& e) { return e.session.server_info() == info; });