diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-01-16 17:30:17 -0800 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-01-16 17:30:17 -0800 |
commit | fe736070d290e640b3ecef6dbc71ef268f868bfe (patch) | |
tree | e466a27babcf415ad2a149065a1e2faee6f3c55a /contrib/epee | |
parent | Merge pull request #6119 (diff) | |
parent | epee: fix peer ids being truncated on display (diff) | |
download | monero-fe736070d290e640b3ecef6dbc71ef268f868bfe.tar.xz |
Merge pull request #6120
feef1c6a epee: fix peer ids being truncated on display (moneromooo-monero)
Diffstat (limited to 'contrib/epee')
-rw-r--r-- | contrib/epee/include/string_tools.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<std::string>(val); } //---------------------------------------------------------------------------- - inline std::string to_string_hex(uint32_t val) + template<typename T> + inline std::string to_string_hex(const T &val) { + static_assert(std::is_arithmetic<T>::value, "only arithmetic types"); std::stringstream ss; ss << std::hex << val; std::string s; |