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