KEMBAR78
Specialize `formatter` for all `std::basic_string` types by dieram3 · Pull Request #3943 · fmtlib/fmt · GitHub
Skip to content

Conversation

@dieram3
Copy link
Contributor

@dieram3 dieram3 commented Apr 22, 2024

This fixes #3938 by adding a formatter partial specialization that covers all std::basic_string types, such as std::pmr::string.

Additionally, this adds the old-school allocator member types to mock_allocator in order to make GCC 4.8 happy. If GCC 4.8 support is removed in the future, these member types can be removed as they are the defaults of allocator_traits.

@dieram3 dieram3 marked this pull request as ready for review April 22, 2024 07:07
Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@vitaut vitaut merged commit cf1f55f into fmtlib:master Apr 23, 2024
@dieram3 dieram3 deleted the fix_pmr_string_formatting branch April 24, 2024 05:52
Arghnews pushed a commit to Arghnews/fmt that referenced this pull request May 1, 2024
* Specialize `formatter` for all `std::basic_string` types

* mock-allocator: add member types to make GCC 4.8 happy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatting for strings with custom allocators fails to compile

2 participants