Skip to content

format_to for basic_memory_writer #776

Closed
@scamille

Description

@scamille

I tried to port my existing ArrayWriter code to the new fmt::basic_memory_writer in Release 5.0.0.

Example which does not work:

fmt::basic_memory_buffer<char, 100> buffer;
fmt::format_to(buffer, "{}", "foo");

What does work:

fmt::memory_buffer buffer;
fmt::format_to(buffer, "{}", "foo");

Would it be possible to provide a fmt::format_to overload which accepts all fmt::basic_memory_writer's, and not just the particular fmt::memory_writer typedef?

Thanks for all the hard work. We are using the library successfully in a medium sized open source project, both as a modern formatting library, as well as a replacement for legacy printf code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions