Add FMT_API and FMT_OVERRIDE where needed
This commit is contained in:
parent
a980d3b46b
commit
f9fa7c405f
@ -39,6 +39,16 @@
|
||||
# define FMT_MSC_VER 0
|
||||
#endif
|
||||
|
||||
#ifndef FMT_OVERRIDE
|
||||
# if FMT_HAS_FEATURE(cxx_override) || \
|
||||
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
|
||||
FMT_MSC_VER >= 1900
|
||||
# define FMT_OVERRIDE override
|
||||
# else
|
||||
# define FMT_OVERRIDE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FMT_NULL
|
||||
# if FMT_HAS_FEATURE(cxx_nullptr) || \
|
||||
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
|
||||
|
@ -437,11 +437,11 @@ template void basic_fixed_buffer<char>::grow(std::size_t);
|
||||
|
||||
template void internal::arg_map<context>::init(const format_args &args);
|
||||
|
||||
template int internal::char_traits<char>::format_float(
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format,
|
||||
unsigned width, int precision, double value);
|
||||
|
||||
template int internal::char_traits<char>::format_float(
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format,
|
||||
unsigned width, int precision, long double value);
|
||||
|
||||
@ -453,11 +453,11 @@ template void basic_fixed_buffer<wchar_t>::grow(std::size_t);
|
||||
|
||||
template void internal::arg_map<wcontext>::init(const wformat_args &args);
|
||||
|
||||
template int internal::char_traits<wchar_t>::format_float(
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||
unsigned width, int precision, double value);
|
||||
|
||||
template int internal::char_traits<wchar_t>::format_float(
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||
unsigned width, int precision, long double value);
|
||||
|
||||
|
@ -282,7 +282,7 @@ class format_error : public std::runtime_error {
|
||||
explicit format_error(const std::string &message)
|
||||
: std::runtime_error(message) {}
|
||||
|
||||
~format_error() throw();
|
||||
FMT_API ~format_error() throw();
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
@ -2095,7 +2095,7 @@ class arg_formatter: public internal::arg_formatter_base<Range> {
|
||||
*/
|
||||
class system_error : public std::runtime_error {
|
||||
private:
|
||||
void init(int err_code, string_view format_str, format_args args);
|
||||
FMT_API void init(int err_code, string_view format_str, format_args args);
|
||||
|
||||
protected:
|
||||
int error_code_;
|
||||
@ -2127,7 +2127,7 @@ class system_error : public std::runtime_error {
|
||||
init(error_code, message, make_args(args...));
|
||||
}
|
||||
|
||||
~system_error() FMT_DTOR_NOEXCEPT;
|
||||
FMT_API ~system_error() FMT_DTOR_NOEXCEPT;
|
||||
|
||||
int error_code() const { return error_code_; }
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ class FormatBuf : public std::basic_streambuf<Char> {
|
||||
this->setp(start_, start_ + buffer_.capacity());
|
||||
}
|
||||
|
||||
int_type overflow(int_type ch = traits_type::eof()) {
|
||||
int_type overflow(int_type ch = traits_type::eof()) FMT_OVERRIDE {
|
||||
if (!traits_type::eq_int_type(ch, traits_type::eof())) {
|
||||
size_t buf_size = size();
|
||||
buffer_.resize(buf_size);
|
||||
|
Loading…
Reference in New Issue
Block a user