From c7b90bac1a2f10d78a1b74c4e8486eee3f766aba Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 9 Jun 2014 17:50:50 +0200 Subject: [PATCH] add explicit unsigned->string conversion --- Util/StringUtil.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Util/StringUtil.h b/Util/StringUtil.h index 9165caa37..476e31cee 100644 --- a/Util/StringUtil.h +++ b/Util/StringUtil.h @@ -89,6 +89,14 @@ static inline std::string IntToString(const int value) return output; } +static inline std::string UintToString(const unsigned value) +{ + std::string output; + std::back_insert_iterator sink(output); + boost::spirit::karma::generate(sink, boost::spirit::karma::uint_, value); + return output; +} + static inline void int64ToString(const int64_t value, std::string &output) { output.clear();