mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-28 18:32:46 +00:00
Fix a -Wweak-vtables warning in clang
This commit is contained in:
parent
dfa631e64a
commit
b26e76efe9
@ -80,6 +80,11 @@ static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace fmt {
|
namespace fmt {
|
||||||
|
|
||||||
|
FMT_FUNC internal::RuntimeError::~RuntimeError() throw() {}
|
||||||
|
FMT_FUNC FormatError::~FormatError() throw() {}
|
||||||
|
FMT_FUNC SystemError::~SystemError() throw() {}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
@ -228,7 +228,6 @@ typedef __int64 intmax_t;
|
|||||||
# define FMT_ASSERT(condition, message) assert((condition) && message)
|
# define FMT_ASSERT(condition, message) assert((condition) && message)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz)
|
#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz)
|
||||||
# define FMT_BUILTIN_CLZ(n) __builtin_clz(n)
|
# define FMT_BUILTIN_CLZ(n) __builtin_clz(n)
|
||||||
#endif
|
#endif
|
||||||
@ -531,13 +530,12 @@ class BasicCStringRef {
|
|||||||
typedef BasicCStringRef<char> CStringRef;
|
typedef BasicCStringRef<char> CStringRef;
|
||||||
typedef BasicCStringRef<wchar_t> WCStringRef;
|
typedef BasicCStringRef<wchar_t> WCStringRef;
|
||||||
|
|
||||||
/**
|
/** A formatting error such as invalid format string. */
|
||||||
A formatting error such as invalid format string.
|
|
||||||
*/
|
|
||||||
class FormatError : public std::runtime_error {
|
class FormatError : public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
explicit FormatError(CStringRef message)
|
explicit FormatError(CStringRef message)
|
||||||
: std::runtime_error(message.c_str()) {}
|
: std::runtime_error(message.c_str()) {}
|
||||||
|
~FormatError() throw();
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
@ -1316,6 +1314,7 @@ struct NamedArg : Arg {
|
|||||||
class RuntimeError : public std::runtime_error {
|
class RuntimeError : public std::runtime_error {
|
||||||
protected:
|
protected:
|
||||||
RuntimeError() : std::runtime_error("") {}
|
RuntimeError() : std::runtime_error("") {}
|
||||||
|
~RuntimeError() throw();
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Impl, typename Char>
|
template <typename Impl, typename Char>
|
||||||
@ -2259,6 +2258,8 @@ class SystemError : public internal::RuntimeError {
|
|||||||
}
|
}
|
||||||
FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef)
|
FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef)
|
||||||
|
|
||||||
|
~SystemError() throw();
|
||||||
|
|
||||||
int error_code() const { return error_code_; }
|
int error_code() const { return error_code_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user