From beb4d231b2815e64a757a8b85fc74d639456a6b2 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 28 Jul 2018 11:42:01 +0100 Subject: [PATCH] Add to_string_view(int) overload. --- include/duckhandy/int_conv.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/duckhandy/int_conv.hpp b/include/duckhandy/int_conv.hpp index 8e08f4f..c7970c2 100644 --- a/include/duckhandy/int_conv.hpp +++ b/include/duckhandy/int_conv.hpp @@ -295,6 +295,11 @@ namespace dhandy { std::basic_string_view to_string_view (const ReversedSizedArray& ary) { return std::basic_string_view(ary.data(), ary.size() - 1); } + + template + std::basic_string_view to_string_view (I num) { + return std::basic_string_view(int_to_ary(num)); + } #endif } //namespace dhandy