We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ToStringHelper::BaseConvert
1 parent 11452a9 commit c5413a1Copy full SHA for c5413a1
src/debug_utils-inl.h
@@ -29,7 +29,7 @@ struct ToStringHelper {
29
static std::string Convert(bool value) { return value ? "true" : "false"; }
30
template <unsigned BASE_BITS,
31
typename T,
32
- typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
+ typename = std::enable_if_t<std::is_integral_v<T>>>
33
static std::string BaseConvert(const T& value) {
34
auto v = static_cast<uint64_t>(value);
35
char ret[3 * sizeof(T)];
@@ -45,7 +45,7 @@ struct ToStringHelper {
45
}
46
47
48
- typename std::enable_if<!std::is_integral<T>::value, int>::type = 0>
+ typename = std::enable_if_t<!std::is_integral_v<T>>>
49
static std::string BaseConvert(T value) {
50
return Convert(std::forward<T>(value));
51
0 commit comments