Skip to content

ranges formatting doesn't work with format_to  #1064

Closed
@lethe555

Description

char buf[100];
	auto p = fmt::format_to(buf, "{}", std::vector<int> { 1, 2, 3 });
	*p = 0;
	std::cout << buf << "\n"; // output nothing
	p = fmt::format_to(buf, "{}", 1);
	*p = 0;
    std::cout << buf << "\n"; // output "1"

seems formatter<RangeT,Char>::format hasn't updated iterator out
out= format_to(out,...);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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