session and insert query builder progress

This commit is contained in:
2026-04-16 16:53:06 +02:00
parent 0a0e3752ea
commit d734d647ed
7 changed files with 110 additions and 88 deletions
+4 -4
View File
@@ -198,16 +198,16 @@ private:
template <typename Target, typename Source>
bool in_range(Source value) {
if constexpr (std::is_signed_v<Source> == std::is_signed_v<Target>) {
return value >= static_cast<Target>(std::numeric_limits<Source>::min()) &&
value <= static_cast<Target>(std::numeric_limits<Source>::max());
return value >= static_cast<Target>((std::numeric_limits<Source>::min)()) &&
value <= static_cast<Target>((std::numeric_limits<Source>::max)());
} else if constexpr (std::is_signed_v<Source> && !std::is_signed_v<Target>) {
if (value < 0) {
return false;
}
using UnsignedSource = std::make_unsigned_t<Source>;
return static_cast<UnsignedSource>(value) <= std::numeric_limits<Target>::max();
return static_cast<UnsignedSource>(value) <= (std::numeric_limits<Target>::max)();
} else {
return value <= static_cast<std::make_unsigned_t<Target>>(std::numeric_limits<Target>::max());
return value <= static_cast<std::make_unsigned_t<Target>>((std::numeric_limits<Target>::max)());
}
}