Clean prev source_loc impl leftovers

This commit is contained in:
gabime
2024-11-29 13:04:08 +02:00
parent c7fc302710
commit 6ea6b065ba
3 changed files with 1 additions and 39 deletions

View File

@@ -202,29 +202,8 @@ private:
};
[[noreturn]] SPDLOG_API void throw_spdlog_ex(const std::string &msg, int last_errno);
[[noreturn]] SPDLOG_API void throw_spdlog_ex(std::string msg);
// trick to capture format string and caller's source location with variadic template.
// see logger::info() etc. to understand how it's used.
struct loc_with_fmt {
source_loc loc;
string_view_t fmt_string;
template <typename S, typename = is_convertible_to_sv<S>>
constexpr loc_with_fmt(S fmt_str, source_loc loc = source_loc::current()) noexcept
: loc(loc),
fmt_string(fmt_str) {}
#ifndef SPDLOG_USE_STD_FORMAT
constexpr loc_with_fmt(fmt::runtime_format_string<char> fmt_str, source_loc loc = source_loc::current()) noexcept
: loc(loc),
fmt_string(fmt_str.str) {}
#endif
};
struct file_event_handlers {
file_event_handlers()
: before_open(nullptr),