From 621eb80bbb5d79f2fc7004eda1656141b453060a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 21 May 2022 11:34:07 -0700 Subject: [PATCH] Remove deprecated APIs --- include/fmt/core.h | 34 ---------------------------------- include/fmt/format.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index c1ef91e1..0ea9ef43 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -204,20 +204,6 @@ # endif #endif -#ifndef FMT_DEPRECATED -# if FMT_HAS_CPP14_ATTRIBUTE(deprecated) || FMT_MSC_VER >= 1900 -# define FMT_DEPRECATED [[deprecated]] -# else -# if (defined(__GNUC__) && !defined(__LCC__)) || defined(__clang__) -# define FMT_DEPRECATED __attribute__((deprecated)) -# elif FMT_MSC_VER -# define FMT_DEPRECATED __declspec(deprecated) -# else -# define FMT_DEPRECATED /* deprecated */ -# endif -# endif -#endif - #ifdef _MSC_VER # define FMT_UNCHECKED_ITERATOR(It) \ using _Unchecked_type = It // Mark iterator as checked. @@ -1386,26 +1372,6 @@ template struct arg_mapper { return std_string_view(val); } - using cstring_result = conditional_t::value, - const char*, unformattable_pointer>; - - FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(const signed char* val) - -> cstring_result { - return map(reinterpret_cast(val)); - } - FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(const unsigned char* val) - -> cstring_result { - return map(reinterpret_cast(val)); - } - FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(signed char* val) - -> cstring_result { - return map(reinterpret_cast(val)); - } - FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(unsigned char* val) - -> cstring_result { - return map(reinterpret_cast(val)); - } - FMT_CONSTEXPR FMT_INLINE auto map(void* val) -> const void* { return val; } FMT_CONSTEXPR FMT_INLINE auto map(const void* val) -> const void* { return val; diff --git a/include/fmt/format.h b/include/fmt/format.h index d6a77cc2..2c4145cf 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -118,6 +118,20 @@ FMT_END_NAMESPACE # endif #endif +#ifndef FMT_DEPRECATED +# if FMT_HAS_CPP14_ATTRIBUTE(deprecated) || FMT_MSC_VER >= 1900 +# define FMT_DEPRECATED [[deprecated]] +# else +# if (defined(__GNUC__) && !defined(__LCC__)) || defined(__clang__) +# define FMT_DEPRECATED __attribute__((deprecated)) +# elif FMT_MSC_VER +# define FMT_DEPRECATED __declspec(deprecated) +# else +# define FMT_DEPRECATED /* deprecated */ +# endif +# endif +#endif + // Workaround broken [[deprecated]] in the Intel, PGI and NVCC compilers. #if FMT_ICC_VERSION || defined(__PGI) || FMT_NVCC # define FMT_DEPRECATED_ALIAS