Remove deprecated APIs
This commit is contained in:
@@ -370,10 +370,6 @@ enum char8_type : unsigned char {};
|
||||
#endif
|
||||
} // namespace detail
|
||||
|
||||
#ifdef FMT_USE_INTERNAL
|
||||
namespace internal = detail; // DEPRECATED
|
||||
#endif
|
||||
|
||||
/**
|
||||
An implementation of ``std::basic_string_view`` for pre-C++17. It provides a
|
||||
subset of the API. ``fmt::basic_string_view`` is used for format strings even
|
||||
@@ -1784,23 +1780,11 @@ template <typename Context> class basic_format_args {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef FMT_ARM_ABI_COMPATIBILITY
|
||||
/** An alias to ``basic_format_args<format_context>``. */
|
||||
// Separate types would result in shorter symbols but break ABI compatibility
|
||||
// between clang and gcc on ARM (#1919).
|
||||
using format_args = basic_format_args<format_context>;
|
||||
using wformat_args = basic_format_args<wformat_context>;
|
||||
#else
|
||||
// DEPRECATED! These are kept for ABI compatibility.
|
||||
// It is a separate type rather than an alias to make symbols readable.
|
||||
struct format_args : basic_format_args<format_context> {
|
||||
template <typename... Args>
|
||||
FMT_INLINE format_args(const Args&... args) : basic_format_args(args...) {}
|
||||
};
|
||||
struct wformat_args : basic_format_args<wformat_context> {
|
||||
using basic_format_args::basic_format_args;
|
||||
};
|
||||
#endif
|
||||
|
||||
FMT_MODULE_EXPORT_END
|
||||
namespace detail {
|
||||
@@ -1985,9 +1969,3 @@ FMT_END_NAMESPACE
|
||||
# include "format.h"
|
||||
#endif
|
||||
#endif // FMT_CORE_H_
|
||||
|
||||
// Define FMT_DYNAMIC_ARGS to make core.h provide dynamic_format_arg_store
|
||||
// DEPRECATED! Include fmt/args.h directly instead.
|
||||
#ifdef FMT_DYNAMIC_ARGS
|
||||
#include "args.h"
|
||||
#endif
|
||||
|
||||
@@ -2689,8 +2689,7 @@ extern "C" __declspec(dllimport) int __stdcall WriteConsoleW( //
|
||||
|
||||
FMT_FUNC void vprint(std::FILE* f, string_view format_str, format_args args) {
|
||||
memory_buffer buffer;
|
||||
detail::vformat_to(buffer, format_str,
|
||||
basic_format_args<buffer_context<char>>(args));
|
||||
detail::vformat_to(buffer, format_str, args);
|
||||
#ifdef _WIN32
|
||||
auto fd = _fileno(f);
|
||||
if (_isatty(fd)) {
|
||||
|
||||
@@ -263,11 +263,6 @@ inline int ctzll(uint64_t x) {
|
||||
FMT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
// Enable the deprecated numeric alignment.
|
||||
#ifndef FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
# define FMT_DEPRECATED_NUMERIC_ALIGN 0
|
||||
#endif
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
namespace detail {
|
||||
|
||||
@@ -1410,11 +1405,6 @@ FMT_CONSTEXPR float_specs parse_float_type_spec(
|
||||
case 'a':
|
||||
result.format = float_format::hex;
|
||||
break;
|
||||
#ifdef FMT_DEPRECATED_N_SPECIFIER
|
||||
case 'n':
|
||||
result.locale = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
eh.on_error("invalid type specifier");
|
||||
break;
|
||||
@@ -1432,9 +1422,6 @@ FMT_CONSTEXPR void check_int_type_spec(char spec, ErrorHandler&& eh) {
|
||||
case 'b':
|
||||
case 'B':
|
||||
case 'o':
|
||||
#ifdef FMT_DEPRECATED_N_SPECIFIER
|
||||
case 'n':
|
||||
#endif
|
||||
case 'c':
|
||||
break;
|
||||
default:
|
||||
@@ -1721,10 +1708,6 @@ FMT_CONSTEXPR OutputIt write_int(OutputIt out, T value,
|
||||
return format_uint<3, Char>(it, abs_value, num_digits);
|
||||
});
|
||||
}
|
||||
#ifdef FMT_DEPRECATED_N_SPECIFIER
|
||||
case 'n':
|
||||
return write_int_localized(out, abs_value, prefix, specs, loc);
|
||||
#endif
|
||||
case 'c':
|
||||
return write_char(out, static_cast<Char>(abs_value), specs);
|
||||
default:
|
||||
@@ -2807,11 +2790,6 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
|
||||
case '>':
|
||||
align = align::right;
|
||||
break;
|
||||
#if FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
case '=':
|
||||
align = align::numeric;
|
||||
break;
|
||||
#endif
|
||||
case '^':
|
||||
align = align::center;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user