Added support for strings containing '\0' in udl (#619)
This commit is contained in:
committed by
Victor Zverovich
parent
84bd2f1962
commit
3aaa25fa70
@@ -4093,7 +4093,7 @@ class udl_formatter {
|
||||
# else
|
||||
template <typename Char>
|
||||
struct udl_formatter {
|
||||
const Char *str;
|
||||
basic_string_view<Char> str;
|
||||
|
||||
template <typename... Args>
|
||||
auto operator()(Args && ... args) const
|
||||
@@ -4134,9 +4134,9 @@ constexpr internal::udl_formatter<Char, CHARS...> operator""_format() {
|
||||
\endrst
|
||||
*/
|
||||
inline internal::udl_formatter<char>
|
||||
operator"" _format(const char *s, std::size_t) { return {s}; }
|
||||
operator"" _format(const char *s, std::size_t n) { return {{s, n}}; }
|
||||
inline internal::udl_formatter<wchar_t>
|
||||
operator"" _format(const wchar_t *s, std::size_t) { return {s}; }
|
||||
operator"" _format(const wchar_t *s, std::size_t n) { return {{s, n}}; }
|
||||
# endif // FMT_UDL_TEMPLATE
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user