...
This commit is contained in:
@@ -7,21 +7,21 @@ namespace adc::interfaces
|
||||
|
||||
// ADC device attribute concept
|
||||
template <typename T>
|
||||
concept adc_device_attr_c = requires(T t, const T const_t) {
|
||||
concept adc_device_attr_c = std::movable<T> && requires(T t, const T const_t) {
|
||||
typename T::ident_t;
|
||||
typename T::default_serialized_t;
|
||||
typename T::serialized_t;
|
||||
|
||||
{ const_t.ident() } -> std::same_as<typename T::ident_t>;
|
||||
|
||||
// serializer and desiarializer must return/accept at least a value of type T::default_serialized_t
|
||||
{ t.serialize() } -> std::convertible_to<typename T::default_serialized_t>;
|
||||
t.deserialize(std::declval<typename T::default_serialized_t>());
|
||||
// serializer and deserializer must return/accept at least a value of type T::serialized_t
|
||||
{ t.serialize() } -> std::convertible_to<typename T::serialized_t>;
|
||||
t.deserialize(std::declval<typename T::serialized_t>());
|
||||
};
|
||||
|
||||
|
||||
// ADC device command concept
|
||||
template <typename T>
|
||||
concept adc_device_cmd_c = requires(T t, const T const_t) {
|
||||
concept adc_device_cmd_c = std::movable<T> && requires(T t, const T const_t) {
|
||||
typename T::ident_t;
|
||||
|
||||
{ const_t.ident() } -> std::same_as<typename T::ident_t>;
|
||||
|
||||
Reference in New Issue
Block a user