diff --git a/src/string/to_string.hpp b/src/string/to_string.hpp index cd8020e..fbf8d13 100644 --- a/src/string/to_string.hpp +++ b/src/string/to_string.hpp @@ -198,7 +198,7 @@ namespace gz { * @returns std::to_string(t) */ template - inline std::string toString(const T& t) { + inline std::string toString(const T& t) requires (!std::same_as) { return std::to_string(t); } @@ -302,6 +302,15 @@ namespace gz { inline std::string toString(const T& t) { return toString(*t); } + + /** + * @overload + * @brief Construct a string from the address of the void* + * @returns toString(reinterpret_cast(voidPtr)) + */ + inline std::string toString(const void* const voidPtr) { + return toString(reinterpret_cast(voidPtr)); + } } // namespace gz