From 0d4e7e3feec84092fc8750ed1dc4febcabe702e2 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 11 Sep 2024 06:17:47 -0700 Subject: [PATCH] Remove old workaround --- include/fmt/format.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index bd92d46e..3ae5ca9d 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -534,16 +534,6 @@ FMT_INLINE void assume(bool condition) { #endif } -// A workaround for std::string not having mutable data() until C++17. -template -inline auto get_data(std::basic_string& s) -> Char* { - return &s[0]; -} -template -inline auto get_data(Container& c) -> typename Container::value_type* { - return c.data(); -} - // Attempts to reserve space for n extra characters in the output range. // Returns a pointer to the reserved range or a reference to it. template typename OutputIt::value_type* { auto& c = get_container(it); size_t size = c.size(); c.resize(size + n); - return get_data(c) + size; + return &c[size]; } template