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;