Skip to content

Commit

Permalink
Merge pull request #194 from filipsajdak/fsajdak-add-to_string-overlo…
Browse files Browse the repository at this point in the history
…ad-for-char

Add cpp2::to_string(char const&) overload
  • Loading branch information
hsutter authored Jan 6, 2023
2 parents c41cc43 + 9da7677 commit 0d7504c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/cpp2util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,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};
Expand Down

0 comments on commit 0d7504c

Please sign in to comment.