upd: alignment of format

This commit is contained in:
mutouyun 2022-12-03 18:19:00 +08:00
parent c39b0fc18c
commit 36b380f80f

View File

@ -75,12 +75,12 @@ inline std::string to_string(std::string const &a, span<char const> fstr) noexce
/// @brief Character to string conversion. /// @brief Character to string conversion.
/// @return an empty string if the conversion fails /// @return an empty string if the conversion fails
inline std::string to_string(char a) noexcept { return {a}; } inline std::string to_string(char a) noexcept { return {a}; }
#if defined(LIBIMP_CPP_20)
inline std::string to_string(char8_t a) noexcept { return to_string((char)a); }
#endif // defined(LIBIMP_CPP_20)
LIBIMP_EXPORT std::string to_string(wchar_t a) noexcept; LIBIMP_EXPORT std::string to_string(wchar_t a) noexcept;
LIBIMP_EXPORT std::string to_string(char16_t a) noexcept; LIBIMP_EXPORT std::string to_string(char16_t a) noexcept;
LIBIMP_EXPORT std::string to_string(char32_t a) noexcept; LIBIMP_EXPORT std::string to_string(char32_t a) noexcept;
#if defined(LIBIMP_CPP_20)
LIBIMP_EXPORT std::string to_string(char8_t a) noexcept { return to_string((char)a); }
#endif // defined(LIBIMP_CPP_20)
/// @brief Conversion of numeric types to strings. /// @brief Conversion of numeric types to strings.
/// @return an empty string if the conversion fails /// @return an empty string if the conversion fails