27template <
typename T,
typename Enabled =
void>
34template <
typename T,
typename =
void>
35struct IsRegistered : std::false_type {};
38struct IsRegistered<T, std::void_t<decltype(TypeRegistry<T>{})>> : std::true_type {};
44 using ValueType =
typename std::remove_cv_t<T>;
46 detail::IsRegistered<ValueType>::value,
47 "The provided template type is not registered. "
48 "Specify the data type manually or add a template specialization for TypeRegistry."
56#define UAPP_TYPEREGISTRY_NATIVE(NativeType, typeIndex) \
58 struct TypeRegistry<NativeType> { \
59 static const auto& getDataType() noexcept { \
60 return UA_TYPES[typeIndex]; \
94 static_assert(std::is_same_v<UA_String, UA_ByteString>);
95 static_assert(std::is_same_v<UA_String, UA_XmlElement>);
97 template <
typename... Ts>
100 detail::AlwaysFalse<Ts...>::value,
101 "Data type of UA_String is ambiguous (alias for UA_ByteString and UA_XmlElement). "
102 "Please specify data type manually."
static UA_LogCategory const char va_list args
const UA_DataType & getDataType() noexcept
#define UAPP_TYPEREGISTRY_NATIVE(NativeType, typeIndex)