Skip to content

Commit e394937

Browse files
konardclaude
andcommitted
Make TLink parameter in LinksOptions configurable and reorder template parameters
This change addresses issue #116 by: - Reordering template parameters to put TLink as the second parameter - Removing the default value from TLinkAddress as requested in issue comments - Updating LinksOptions template signature to match the desired format from the issue - Updating test files to use the new parameter order The new parameter order is: template<TLinkAddress, TLink, TWriteHandler, TReadHandler, VConstants> This makes LinksOptions more adjustable by users and reduces code duplication. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d644c7b commit e394937

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cpp/Platform.Data.Tests/ILinksTests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
namespace Platform::Data::Tests
22
{
3-
template<std::integral TLinkAddress = std::uint64_t, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}, typename TLink = std::vector<TLinkAddress>, typename TReadHandler = std::function<TLinkAddress(TLink)>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>>
4-
struct Links : public ILinks<LinksOptions<TLinkAddress, VConstants, TLink,TReadHandler, TWriteHandler>>
3+
template<std::integral TLinkAddress, typename TLink = std::vector<TLinkAddress>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>, typename TReadHandler = std::function<TLinkAddress(TLink)>, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}>
4+
struct Links : public ILinks<LinksOptions<TLinkAddress, TLink, TWriteHandler, TReadHandler, VConstants>>
55
{
6-
using base = ILinks<LinksOptions<TLinkAddress, VConstants, TLink, TReadHandler, TWriteHandler>>;
6+
using base = ILinks<LinksOptions<TLinkAddress, TLink, TWriteHandler, TReadHandler, VConstants>>;
77
using typename base::LinkAddressType;
88
using typename base::LinkType;
99
using typename base::WriteHandlerType;

cpp/Platform.Data/LinksOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Platform::Data
22
{
33

4-
template<std::integral TLinkAddress = std::uint64_t, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}, typename TLink = std::vector<TLinkAddress>, typename TReadHandler = std::function<TLinkAddress(TLink)>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>>
4+
template<std::integral TLinkAddress, typename TLink = std::vector<TLinkAddress>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>, typename TReadHandler = std::function<TLinkAddress(TLink)>, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}>
55
struct LinksOptions
66
{
77
using LinkAddressType = TLinkAddress;

0 commit comments

Comments
 (0)