mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Add overload to 'print' void* correctly
This commit is contained in:
@@ -79,6 +79,19 @@ namespace Detail {
|
||||
}
|
||||
};
|
||||
|
||||
// For display purposes only.
|
||||
// Anything implicitly convertible to void* ends up here
|
||||
inline std::string rawMemoryToString(void* p)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
#ifdef _MSC_VER
|
||||
oss << "0x" << p;
|
||||
#else
|
||||
oss << p;
|
||||
#endif
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
// For display purposes only.
|
||||
// Does not consider endian-ness
|
||||
template<typename T>
|
||||
|
Reference in New Issue
Block a user