Use *_t and *_v trait helpers from C++17 STL (#731)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user