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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy