From b9bb2fe9f6ef41d8efdd32758c5e391283083990 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 23:18:36 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #113 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Data/issues/113 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..4e4c2f4 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Data/issues/113 +Your prepared branch: issue-113-dca088a9 +Your prepared working directory: /tmp/gh-issue-solver-1757708307945 + +Proceed. \ No newline at end of file From 5111329149d37991e98b11f3558a2598e367f6b8 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 23:23:13 +0300 Subject: [PATCH 2/3] Add Update method with variadic restrictions to fix parameter order issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a new variadic template Update method that properly calls the base Update method with restrictions before substitution, resolving issue #113. Also added a test for the new method to ensure it works correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- cpp/Platform.Data.Tests/ILinksTests.cpp | 1 + cpp/Platform.Data/ILinksExtensions.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/cpp/Platform.Data.Tests/ILinksTests.cpp b/cpp/Platform.Data.Tests/ILinksTests.cpp index 99159b5..80af94a 100644 --- a/cpp/Platform.Data.Tests/ILinksTests.cpp +++ b/cpp/Platform.Data.Tests/ILinksTests.cpp @@ -31,6 +31,7 @@ namespace Platform::Data::Tests const TLinkAddress linkAddress {1}; Create(storage, linkAddress); Update(storage, TLink{1}, TLink{1, 1}); + Update(storage, TLink{1, 1}, linkAddress); // Test new variadic Update method storage.Count(TLink{1}); const_links.Count(TLink{1}); storage.Each(TLink{1}, [](const TLink& link){ return 1; }); diff --git a/cpp/Platform.Data/ILinksExtensions.h b/cpp/Platform.Data/ILinksExtensions.h index eda9516..a0540dd 100644 --- a/cpp/Platform.Data/ILinksExtensions.h +++ b/cpp/Platform.Data/ILinksExtensions.h @@ -89,6 +89,13 @@ typename TStorage::LinkType restrictionContainer { static_cast(restriction)... }; return DIRECT_METHOD_CALL(TStorage, storage, Each, restrictionContainer, handler); } + + template + static typename TStorage::LinkAddressType Update(TStorage& storage, const typename TStorage::LinkType& substitution, std::convertible_to auto... restrictions) + { + typename TStorage::LinkType restrictionContainer { static_cast(restrictions)... }; + return Update(storage, restrictionContainer, substitution); + } template static typename TStorage::LinkType GetLink(const TStorage& storage, typename TStorage::LinkAddressType linkAddress) From 4417434a2bc5a4f14589f21cc2c05ee5240d84c1 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 23:24:11 +0300 Subject: [PATCH 3/3] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 4e4c2f4..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Data/issues/113 -Your prepared branch: issue-113-dca088a9 -Your prepared working directory: /tmp/gh-issue-solver-1757708307945 - -Proceed. \ No newline at end of file