Skip to content

Commit

Permalink
src: simplify enable_if logic of ToStringHelper::BaseConvert
Browse files Browse the repository at this point in the history
PR-URL: #44306
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
F3n67u authored and RafaelGSS committed Sep 7, 2022
1 parent 11452a9 commit c5413a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug_utils-inl.h
Expand Up @@ -29,7 +29,7 @@ struct ToStringHelper {
static std::string Convert(bool value) { return value ? "true" : "false"; }
template <unsigned BASE_BITS,
typename T,
typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
typename = std::enable_if_t<std::is_integral_v<T>>>
static std::string BaseConvert(const T& value) {
auto v = static_cast<uint64_t>(value);
char ret[3 * sizeof(T)];
Expand All @@ -45,7 +45,7 @@ struct ToStringHelper {
}
template <unsigned BASE_BITS,
typename T,
typename std::enable_if<!std::is_integral<T>::value, int>::type = 0>
typename = std::enable_if_t<!std::is_integral_v<T>>>
static std::string BaseConvert(T value) {
return Convert(std::forward<T>(value));
}
Expand Down

0 comments on commit c5413a1

Please sign in to comment.