Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxnyasha committed Dec 20, 2023
1 parent 2c4db8d commit 7307548
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions universal/include/userver/formats/parse/try_parse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ template <typename T, typename Value>
constexpr inline bool Is(Value&& value) {
if constexpr(std::is_same_v<T, bool>) {
return value.IsBool();
} else if constexpr(std::is_convertible_v<T, std::int64_t>) {
return value.IsInt64();
} else if constexpr(std::is_convertible_v<T, std::uint64_t>) {
return value.IsUInt64();
} else if constexpr(meta::kIsInteger<T>) {
return (std::is_unsigned_v<T> && sizeof(T) == sizeof(uint64_t)) ? value.IsUInt64() : value.IsInt64();
} else if constexpr(std::is_convertible_v<T, std::string>) {
return value.IsString();
} else if constexpr(std::is_convertible_v<T, double>) {
Expand Down

0 comments on commit 7307548

Please sign in to comment.