Revert "Correct changes in LoggingFormatStringHelpers.h"

This reverts commit e27472c09d.
This commit is contained in:
Robert Schulze 2024-02-29 11:33:26 +00:00
parent e27472c09d
commit 117764e53c
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -26,7 +26,7 @@ struct FormatStringHelperImpl
formatStringCheckArgsNumImpl(message_format_string, sizeof...(Args));
}
template<typename T>
explicit FormatStringHelperImpl(fmt::basic_runtime<T> && str) : fmt_str(std::forward<fmt::basic_runtime<T>>(str)) {}
FormatStringHelperImpl(fmt::basic_runtime<T> && str) : message_format_string(), fmt_str(std::forward<fmt::basic_runtime<T>>(str)) {} /// NOLINT
PreformattedMessage format(Args && ...args) const;
};
@ -43,9 +43,9 @@ struct PreformattedMessage
template <typename... Args>
static PreformattedMessage create(FormatStringHelper<Args...> fmt, Args &&... args);
explicit operator const std::string & () const { return text; }
explicit operator std::string () && { return std::move(text); }
explicit operator fmt::format_string<> () const { UNREACHABLE(); }
operator const std::string & () const { return text; } /// NOLINT
operator std::string () && { return std::move(text); } /// NOLINT
operator fmt::format_string<> () const { UNREACHABLE(); } /// NOLINT
void apply(std::string & out_text, std::string_view & out_format_string) const &
{