linksplatform / Data

LinksPlatform's Platform.Data Class Library
https://linksplatform.github.io/Data
The Unlicense
1 stars 3 forks source link

Make TLink out of LinkType #116

Open Konard opened 2 years ago

Konard commented 2 years ago

https://github.com/linksplatform/Data/blob/dbb84e136c41b1054c6a9916152104947642f19a/cpp/Platform.Data/LinksOptions.h#L3-L11

 template<typename TLinkAddress = std::uint64_t, typename TLink = std::vector<TLinkAddress>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>, typename TReadHandler = std::function<TLinkAddress(TLink)>, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}> 
 struct LinksOptions 
 { 
     using LinkAddressType = TLinkAddress; 
     using LinkType = TLink; 
     using WriteHandlerType = TWriteHandler; 
     using ReadHandlerType = TReadHandler; 
     static constexpr LinksConstants<LinkAddressType> Constants = VConstants; 
 }; 

This change will reduce duplication in code and will make LinksOptions more adjustable by user.

uselessgoddess commented 2 years ago
typename TLinkAddress = std::uint64_t

Please remove = std::uint64_t