Skip to content

Commit 042c5fe

Browse files
committed
Add retrieve_any function implementation
Add retrieve_any function implementation
1 parent be2fd35 commit 042c5fe

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,17 @@ struct Workspace
539539
return nullptr;
540540
}
541541

542+
// retrieve_any function implementation
543+
std::optional<std::any> retrieve_any(const std::string_view name) const
544+
{
545+
std::lock_guard<std::mutex> lock(mtx);
546+
if (auto it = memory_store.find(std::string(name)); it != std::ranges::end(memory_store))
547+
{
548+
return it->second;
549+
}
550+
return std::nullopt;
551+
}
552+
542553
// remove function implementation
543554
bool remove(const std::string_view name)
544555
{

0 commit comments

Comments
 (0)