From feef1c6aace7c320502feb179b64a33101a62f67 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 11 Nov 2019 12:13:21 +0000 Subject: [PATCH] epee: fix peer ids being truncated on display --- contrib/epee/include/string_tools.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index 1be5eb5e1..319c0121b 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -188,8 +188,10 @@ POP_WARNINGS return boost::lexical_cast(val); } //---------------------------------------------------------------------------- - inline std::string to_string_hex(uint32_t val) + template + inline std::string to_string_hex(const T &val) { + static_assert(std::is_arithmetic::value, "only arithmetic types"); std::stringstream ss; ss << std::hex << val; std::string s;