diff --git a/include/fmt/core.h b/include/fmt/core.h index f2f0f21f..f2802362 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1090,8 +1090,6 @@ enum { packed_arg_bits = 5 }; enum { max_packed_args = 62 / packed_arg_bits }; enum : unsigned long long { is_unpacked_bit = 1ULL << 63 }; enum : unsigned long long { has_named_args_bit = 1ULL << 62 }; - -template class arg_map; } // namespace internal // A formatting argument. It is a trivially copyable/constructible type to @@ -1111,7 +1109,6 @@ template class basic_format_arg { -> decltype(vis(0)); friend class basic_format_args; - friend class internal::arg_map; friend class dynamic_format_arg_store; using char_type = typename Context::char_type; @@ -1652,8 +1649,6 @@ template class basic_format_args { return static_cast((desc_ >> shift) & mask); } - friend class internal::arg_map; - basic_format_args(unsigned long long desc, const internal::value* values) : desc_(desc), values_(values) {} diff --git a/src/format.cc b/src/format.cc index c26ce6a5..d928cfed 100644 --- a/src/format.cc +++ b/src/format.cc @@ -23,46 +23,6 @@ int format_float(char* buf, std::size_t size, const char* format, int precision, return precision < 0 ? snprintf_ptr(buf, size, format, value) : snprintf_ptr(buf, size, format, precision, value); } - -// DEPRECATED. -template class arg_map { - private: - struct entry { - basic_string_view name; - basic_format_arg arg; - }; - - entry* map_; - unsigned size_; - - void push_back(value val) { - const auto& named = *val.named_arg; - map_[size_] = {named.name, named.template deserialize()}; - ++size_; - } - - public: - void init(const basic_format_args& args); -}; - -// This is deprecated and is kept only to preserve ABI compatibility. -template -void arg_map::init(const basic_format_args& args) { - if (map_) return; - map_ = new entry[internal::to_unsigned(args.max_size())]; - if (args.is_packed()) { - for (int i = 0;; ++i) { - internal::type arg_type = args.type(i); - if (arg_type == internal::type::none_type) return; - if (arg_type == internal::type::named_arg_type) - push_back(args.values_[i]); - } - } - for (int i = 0, n = args.max_size(); i < n; ++i) { - auto type = args.args_[i].type_; - if (type == internal::type::named_arg_type) push_back(args.args_[i].value_); - } -} } // namespace internal template struct FMT_INSTANTIATION_DEF_API internal::basic_data; @@ -85,9 +45,6 @@ template FMT_API char internal::decimal_point_impl(locale_ref); template FMT_API void internal::buffer::append(const char*, const char*); -template FMT_API void internal::arg_map::init( - const basic_format_args& args); - template FMT_API std::string internal::vformat( string_view, basic_format_args);