mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Standardize on template<typename. No functional change.
This commit is contained in:
+3
-3
@@ -33,20 +33,20 @@
|
||||
//######################################################################
|
||||
// Global string-related functions
|
||||
|
||||
template <class T>
|
||||
template <typename T>
|
||||
std::string cvtToStr(const T& t) VL_PURE {
|
||||
std::ostringstream os;
|
||||
os << t;
|
||||
return os.str();
|
||||
}
|
||||
template <class T>
|
||||
template <typename T>
|
||||
typename std::enable_if<std::is_pointer<T>::value, std::string>::type
|
||||
cvtToHex(const T tp) VL_PURE {
|
||||
std::ostringstream os;
|
||||
os << static_cast<const void*>(tp);
|
||||
return os.str();
|
||||
}
|
||||
template <class T>
|
||||
template <typename T>
|
||||
typename std::enable_if<std::is_integral<T>::value, std::string>::type cvtToHex(const T t) {
|
||||
std::ostringstream os;
|
||||
os << std::hex << std::setw(sizeof(T) * 8 / 4) << std::setfill('0') << t;
|
||||
|
||||
Reference in New Issue
Block a user