From 9da767746661dd985b2c73f795c6d2d8797449e8 Mon Sep 17 00:00:00 2001 From: Filip Sajdak Date: Mon, 2 Jan 2023 20:42:34 +0100 Subject: [PATCH] Add cpp2::to_string(char const&) overload --- include/cpp2util.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/cpp2util.h b/include/cpp2util.h index 60dbe90de2..7885612daa 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -1078,6 +1078,11 @@ inline auto to_string(T const& t) -> std::string return std::to_string(t); } +inline auto to_string(char const& t) -> std::string +{ + return std::string{t}; +} + inline auto to_string(char const* s) -> std::string { return std::string{s};