PIRegularExpression::from static constructor

This commit is contained in:
2025-08-11 19:27:12 +03:00
parent 68615035aa
commit 3504c25f84
4 changed files with 48 additions and 3 deletions

View File

@@ -52,7 +52,8 @@ template<typename T,
typename std::enable_if<!std::is_enum<T>::value, int>::type = 0,
typename std::enable_if<!std::is_arithmetic<T>::value, int>::type = 0>
inline PIJSON piSerializeJSON(const T & v) {
static_assert(false, "[piSerializeJSON] Error: using undeclared piSerializeJSON() for complex type!");
static_assert(std::is_enum<T>::value || std::is_arithmetic<T>::value,
"[piSerializeJSON] Error: using undeclared piSerializeJSON() for complex type!");
return {};
}
@@ -239,7 +240,8 @@ template<typename T,
typename std::enable_if<!std::is_enum<T>::value, int>::type = 0,
typename std::enable_if<!std::is_arithmetic<T>::value, int>::type = 0>
inline void piDeserializeJSON(T & v, const PIJSON & js) {
static_assert(false, "[piDeserializeJSON] Error: using undeclared piDeserializeJSON() for complex type!");
static_assert(std::is_enum<T>::value || std::is_arithmetic<T>::value,
"[piDeserializeJSON] Error: using undeclared piDeserializeJSON() for complex type!");
v = {};
}