mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-07 09:55:52 +00:00
Cleanup fixed_string
This commit is contained in:
parent
2cb3b7c64b
commit
786a4b0968
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user