This commit is contained in:
2024-09-27 14:57:46 +03:00
parent 1c327f8fd3
commit 242a0571e0
3 changed files with 17 additions and 24 deletions

View File

@@ -47,6 +47,20 @@ using adc_common_duration_t = adc_duration_common_type_t<std::chrono::nanosecond
std::chrono::months,
std::chrono::years>;
// concepts for asynchronous opereration callback callable first argument type (asynchronous operation error)
// 1) the type must be convertible to boolean and
// a) true - asynchronous operation completed without errors
// b) false - an error occured
template <typename ERRT>
concept adc_async_callback_err_t = std::convertible_to<std::remove_cvref_t<ERRT>, bool>;
// concepts for asynchronous opereration callback callable
// 1) the type must be a callable with at least 1 input argument
// 2) the first argument type must satisfy the concept adc_async_callback_err_t
template <typename T>
concept adc_async_callback_t = traits::adc_is_callable<T> && traits::adc_func_traits<T>::arity &&
adc_async_callback_err_t<traits::adc_func_arg1_t<T>>;
/*
struct NetService {
typedef ImplementationDependentT netservice_ident_t;