Skip to content

Commit 1a1de1a

Browse files
authored
Merge pull request hsutter#194 from filipsajdak/fsajdak-add-to_string-overload-for-char
Add cpp2::to_string(char const&) overload
2 parents 0cf6967 + 80edc29 commit 1a1de1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/cpp2util.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,11 @@ inline auto to_string(T const& t) -> std::string
11531153
return std::to_string(t);
11541154
}
11551155

1156+
inline auto to_string(char const& t) -> std::string
1157+
{
1158+
return std::string{t};
1159+
}
1160+
11561161
inline auto to_string(char const* s) -> std::string
11571162
{
11581163
return std::string{s};

0 commit comments

Comments
 (0)