Cleanup string traits

This commit is contained in:
Victor Zverovich
2024-01-05 17:48:12 -08:00
parent 1e938dda20
commit 0641b844ac
6 changed files with 36 additions and 54 deletions

View File

@@ -605,8 +605,7 @@ inline auto vsprintf(
std::string message = fmt::sprintf("The answer is %d", 42);
\endrst
*/
template <typename S, typename... T,
typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
template <typename S, typename... T, typename Char = char_t<S>>
inline auto sprintf(const S& fmt, const T&... args) -> std::basic_string<Char> {
return vsprintf(detail::to_string_view(fmt),
fmt::make_format_args<basic_printf_context<Char>>(args...));