mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
clang format
This commit is contained in:
@@ -107,7 +107,8 @@
|
||||
# define SPDLOG_TRY try
|
||||
# define SPDLOG_THROW(ex) throw(ex)
|
||||
# define SPDLOG_CATCH_STD \
|
||||
catch (const std::exception &) {}
|
||||
catch (const std::exception &) \
|
||||
{}
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
@@ -173,12 +174,12 @@ using format_string_t = fmt::format_string<Args...>;
|
||||
template<class T>
|
||||
using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
|
||||
|
||||
template <typename Char>
|
||||
#if FMT_VERSION >= 90101
|
||||
template<typename Char>
|
||||
# if FMT_VERSION >= 90101
|
||||
using fmt_runtime_string = fmt::runtime_format_string<Char>;
|
||||
#else
|
||||
# else
|
||||
using fmt_runtime_string = fmt::basic_runtime<Char>;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
// clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here,
|
||||
// in addition, fmt::basic_runtime<Char> is only convertible to basic_format_string<Char> but not basic_string_view<Char>
|
||||
@@ -391,7 +392,7 @@ template<bool B, class T = void>
|
||||
using enable_if_t = typename std::enable_if<B, T>::type;
|
||||
|
||||
template<typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args &&... args)
|
||||
std::unique_ptr<T> make_unique(Args &&...args)
|
||||
{
|
||||
static_assert(!std::is_array<T>::value, "arrays not supported");
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
|
Reference in New Issue
Block a user