Skip to content

Commit

Permalink
util: Fix incorrect test for long double
Browse files Browse the repository at this point in the history
  • Loading branch information
shramov committed Dec 9, 2023
1 parent 89ba239 commit 65b5ca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tll/util/conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ struct dump<T, typename std::enable_if<std::is_floating_point_v<T>>::type> : pub
{
static constexpr std::string_view _snprintf_format()
{
if constexpr (sizeof(T) == sizeof(long double))
if constexpr (std::is_same_v<T, long double>)
return "%.*Lg";
return "%.*g";
}
Expand Down

0 comments on commit 65b5ca8

Please sign in to comment.