Use *_t and *_v trait helpers from C++17 STL (#731)

This commit is contained in:
Bart Louwers
2023-01-26 10:10:33 +00:00
committed by GitHub
parent e94f0e9b1b
commit f7fa009f08
24 changed files with 58 additions and 59 deletions

View File

@@ -48,22 +48,22 @@ inline std::string toString(uint8_t t) {
return toString(static_cast<uint32_t>(t));
}
template <typename = std::enable_if<!std::is_same<uint64_t, unsigned long>::value>>
template <typename = std::enable_if<!std::is_same_v<uint64_t, unsigned long>>>
inline std::string toString(unsigned long t) {
return toString(static_cast<uint64_t>(t));
}
template <typename = std::enable_if<!std::is_same<uint64_t, unsigned long long>::value>>
template <typename = std::enable_if<!std::is_same_v<uint64_t, unsigned long long>>>
inline std::string toString(unsigned long long t) {
return toString(static_cast<uint64_t>(t));
}
template <typename = std::enable_if<!std::is_same<int64_t, long>::value>>
template <typename = std::enable_if<!std::is_same_v<int64_t, long>>>
inline std::string toString(long t) {
return toString(static_cast<int64_t>(t));
}
template <typename = std::enable_if<!std::is_same<int64_t, long long>::value>>
template <typename = std::enable_if<!std::is_same_v<int64_t, long long>>>
inline std::string toString(long long t) {
return toString(static_cast<int64_t>(t));
}