Cleanup fixed_string

This commit is contained in:
Victor Zverovich 2024-10-09 08:42:49 -07:00
parent 2cb3b7c64b
commit 786a4b0968

View File

@ -1004,15 +1004,13 @@ class FMT_SO_VISIBILITY("default") format_error : public std::runtime_error {
}; };
namespace detail_exported { namespace detail_exported {
#if FMT_USE_NONTYPE_TEMPLATE_ARGS
template <typename Char, size_t N> struct fixed_string { template <typename Char, size_t N> struct fixed_string {
constexpr fixed_string(const Char (&str)[N]) { FMT_CONSTEXPR20 fixed_string(const Char (&s)[N]) {
detail::copy<Char, const Char*, Char*>(static_cast<const Char*>(str), detail::copy<Char, const Char*, Char*>(static_cast<const Char*>(s), s + N,
str + N, data); data);
} }
Char data[N] = {}; Char data[N] = {};
}; };
#endif // FMT_USE_NONTYPE_TEMPLATE_ARGS
// Converts a compile-time string to basic_string_view. // Converts a compile-time string to basic_string_view.
template <typename Char, size_t N> template <typename Char, size_t N>