-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCLinks.h
More file actions
21 lines (19 loc) · 1.09 KB
/
CLinks.h
File metadata and controls
21 lines (19 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <concepts>
namespace Platform::Interfaces {
template <typename TSelf>
concept CLinks = requires {
typename TSelf::OptionsType;
typename TSelf::LinkAddressType;
typename TSelf::LinkType;
typename TSelf::WriteHandlerType;
typename TSelf::ReadHandlerType;
} && requires(TSelf self, const typename TSelf::LinkType& restriction, const typename TSelf::LinkType& substitution, const typename TSelf::ReadHandlerType& readHandler, const typename TSelf::WriteHandlerType& writeHandler) {
{ self.Constants } -> std::convertible_to<const auto&>;
{ self.Count(restriction) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Each(restriction, readHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Create(restriction, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Update(restriction, substitution, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Delete(restriction, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
};
} // namespace Platform::Interfaces