lib/fmt/ExceptionFormatter: un-inline to reduce header dependencies
This commit is contained in:
parent
3f638eeed6
commit
175103e8d4
|
@ -0,0 +1,12 @@
|
|||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#include "ExceptionFormatter.hxx"
|
||||
#include "util/Exception.hxx"
|
||||
|
||||
auto
|
||||
fmt::formatter<std::exception_ptr>::format(std::exception_ptr e, format_context &ctx) const
|
||||
-> format_context::iterator
|
||||
{
|
||||
return formatter<string_view>::format(GetFullMessage(e), ctx);
|
||||
}
|
|
@ -1,20 +1,14 @@
|
|||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef EXCEPTION_FORMATTER_HXX
|
||||
#define EXCEPTION_FORMATTER_HXX
|
||||
|
||||
#include "util/Exception.hxx"
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <exception>
|
||||
|
||||
template<>
|
||||
struct fmt::formatter<std::exception_ptr> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
auto format(std::exception_ptr e, FormatContext &ctx) const {
|
||||
return formatter<string_view>::format(GetFullMessage(e), ctx);
|
||||
}
|
||||
auto format(std::exception_ptr e, format_context &ctx) const -> format_context::iterator;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,7 @@ endif
|
|||
|
||||
fmt = static_library(
|
||||
'fmt',
|
||||
'ExceptionFormatter.cxx',
|
||||
'RuntimeError.cxx',
|
||||
'SocketAddressFormatter.cxx',
|
||||
'SystemError.cxx',
|
||||
|
|
Loading…
Reference in New Issue