Skip to content

Commit c5413a1

Browse files
F3n67uRafaelGSS
authored andcommitted
src: simplify enable_if logic of ToStringHelper::BaseConvert
PR-URL: #44306 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 11452a9 commit c5413a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/debug_utils-inl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct ToStringHelper {
2929
static std::string Convert(bool value) { return value ? "true" : "false"; }
3030
template <unsigned BASE_BITS,
3131
typename T,
32-
typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
32+
typename = std::enable_if_t<std::is_integral_v<T>>>
3333
static std::string BaseConvert(const T& value) {
3434
auto v = static_cast<uint64_t>(value);
3535
char ret[3 * sizeof(T)];
@@ -45,7 +45,7 @@ struct ToStringHelper {
4545
}
4646
template <unsigned BASE_BITS,
4747
typename T,
48-
typename std::enable_if<!std::is_integral<T>::value, int>::type = 0>
48+
typename = std::enable_if_t<!std::is_integral_v<T>>>
4949
static std::string BaseConvert(T value) {
5050
return Convert(std::forward<T>(value));
5151
}

0 commit comments

Comments
 (0)