From 3424529a7024c2e91fba466f09d50cf6a966db54 Mon Sep 17 00:00:00 2001 From: William Hicks Date: Wed, 29 Nov 2023 22:26:53 -0500 Subject: [PATCH] Correct building of std::optional --- cpp/include/raft/core/device_resources_manager.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cpp/include/raft/core/device_resources_manager.hpp b/cpp/include/raft/core/device_resources_manager.hpp index 1eb0a164ec..c3482b0c04 100644 --- a/cpp/include/raft/core/device_resources_manager.hpp +++ b/cpp/include/raft/core/device_resources_manager.hpp @@ -296,11 +296,10 @@ struct device_resources_manager { auto scoped_device = device_setter(device_id); // Build the device_resources object for this thread out of shared // components - thread_resources[device_id] = - raft::device_resources{component_iter->get_stream(), - component_iter->get_pool(), - component_iter->get_workspace_memory_resource(), - component_iter->get_workspace_allocation_limit()}; + thread_resources[device_id].emplace(component_iter->get_stream(), + component_iter->get_pool(), + component_iter->get_workspace_memory_resource(), + component_iter->get_workspace_allocation_limit()); } return thread_resources[device_id].value();