mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Remove deprecated APIs
This commit is contained in:
parent
40bc7163fb
commit
d6cea50d01
@ -439,11 +439,6 @@ template <typename Char> class basic_string_view {
|
||||
using string_view = basic_string_view<char>;
|
||||
using wstring_view = basic_string_view<wchar_t>;
|
||||
|
||||
#ifndef __cpp_char8_t
|
||||
// char8_t is deprecated; use char instead.
|
||||
using char8_t FMT_DEPRECATED_ALIAS = internal::char8_type;
|
||||
#endif
|
||||
|
||||
/** Specifies if ``T`` is a character type. Can be specialized by users. */
|
||||
template <typename T> struct is_char : std::false_type {};
|
||||
template <> struct is_char<char> : std::true_type {};
|
||||
@ -613,12 +608,6 @@ class basic_format_parse_context : private ErrorHandler {
|
||||
using format_parse_context = basic_format_parse_context<char>;
|
||||
using wformat_parse_context = basic_format_parse_context<wchar_t>;
|
||||
|
||||
template <typename Char, typename ErrorHandler = internal::error_handler>
|
||||
using basic_parse_context FMT_DEPRECATED_ALIAS =
|
||||
basic_format_parse_context<Char, ErrorHandler>;
|
||||
using parse_context FMT_DEPRECATED_ALIAS = basic_format_parse_context<char>;
|
||||
using wparse_context FMT_DEPRECATED_ALIAS = basic_format_parse_context<wchar_t>;
|
||||
|
||||
template <typename Context> class basic_format_arg;
|
||||
template <typename Context> class basic_format_args;
|
||||
|
||||
@ -889,10 +878,9 @@ template <typename Char> struct named_arg_value {
|
||||
};
|
||||
|
||||
template <typename Context> struct custom_value {
|
||||
using parse_context = basic_format_parse_context<typename Context::char_type>;
|
||||
using parse_context = typename Context::parse_context_type;
|
||||
const void* value;
|
||||
void (*format)(const void* arg,
|
||||
typename Context::parse_context_type& parse_ctx, Context& ctx);
|
||||
void (*format)(const void* arg, parse_context& parse_ctx, Context& ctx);
|
||||
};
|
||||
|
||||
// A formatting argument value.
|
||||
|
@ -43,10 +43,6 @@
|
||||
|
||||
#include "core.h"
|
||||
|
||||
#ifdef FMT_DEPRECATED_INCLUDE_OS
|
||||
# include "os.h"
|
||||
#endif
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
# define FMT_ICC_VERSION __INTEL_COMPILER
|
||||
#elif defined(__ICL)
|
||||
@ -590,26 +586,6 @@ class buffer_range : public internal::output_range<
|
||||
: internal::output_range<iterator, T>(std::back_inserter(buf)) {}
|
||||
};
|
||||
|
||||
class FMT_DEPRECATED u8string_view
|
||||
: public basic_string_view<internal::char8_type> {
|
||||
public:
|
||||
u8string_view(const char* s)
|
||||
: basic_string_view<internal::char8_type>(
|
||||
reinterpret_cast<const internal::char8_type*>(s)) {}
|
||||
u8string_view(const char* s, size_t count) FMT_NOEXCEPT
|
||||
: basic_string_view<internal::char8_type>(
|
||||
reinterpret_cast<const internal::char8_type*>(s), count) {}
|
||||
};
|
||||
|
||||
#if FMT_USE_USER_DEFINED_LITERALS
|
||||
inline namespace literals {
|
||||
FMT_DEPRECATED inline basic_string_view<internal::char8_type> operator"" _u(
|
||||
const char* s, std::size_t n) {
|
||||
return {reinterpret_cast<const internal::char8_type*>(s), n};
|
||||
}
|
||||
} // namespace literals
|
||||
#endif
|
||||
|
||||
// The number of characters to store in the basic_memory_buffer object itself
|
||||
// to avoid dynamic memory allocation.
|
||||
enum { inline_buffer_size = 500 };
|
||||
@ -2702,10 +2678,6 @@ FMT_CONSTEXPR basic_string_view<Char> compile_string_to_view(
|
||||
*/
|
||||
#define FMT_STRING(s) FMT_STRING_IMPL(s, )
|
||||
|
||||
#if defined(FMT_STRING_ALIAS) && FMT_STRING_ALIAS
|
||||
# define fmt(s) FMT_STRING_IMPL(s, [[deprecated]])
|
||||
#endif
|
||||
|
||||
template <typename... Args, typename S,
|
||||
enable_if_t<(is_compile_string<S>::value), int>>
|
||||
void check_format_string(S format_str) {
|
||||
@ -2743,12 +2715,6 @@ FMT_API void report_error(format_func func, int error_code,
|
||||
string_view message) FMT_NOEXCEPT;
|
||||
} // namespace internal
|
||||
|
||||
template <typename Range>
|
||||
using basic_writer FMT_DEPRECATED_ALIAS = internal::basic_writer<Range>;
|
||||
using writer FMT_DEPRECATED_ALIAS = internal::writer;
|
||||
using wwriter FMT_DEPRECATED_ALIAS =
|
||||
internal::basic_writer<buffer_range<wchar_t>>;
|
||||
|
||||
/** The default argument formatter. */
|
||||
template <typename Range>
|
||||
class arg_formatter : public internal::arg_formatter_base<Range> {
|
||||
|
@ -426,9 +426,6 @@ TEST(FormatTest, FormatErrorCode) {
|
||||
}
|
||||
|
||||
TEST(FormatTest, CountCodePoints) {
|
||||
#ifndef __cpp_char8_t
|
||||
using fmt::char8_t;
|
||||
#endif
|
||||
EXPECT_EQ(
|
||||
4, fmt::internal::count_code_points(
|
||||
fmt::basic_string_view<fmt::internal::char8_type>(
|
||||
|
Loading…
Reference in New Issue
Block a user