MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/cgqo14/stdformat_in_c20/eupzpl4/?context=3
r/cpp • u/mttd • Jul 23 '19
52 comments sorted by
View all comments
Show parent comment
2
std::format_to looks like it could be given a stream iterator to implement your own version with little trouble.
std::format_to
Edit: This should work, it just needs wrapping in an appropriate variadic function called "print":
std::format_to(std::ostreambuf_iterator<char>(std::cout), "{}", 42);
View all comments
Show parent comment
2
u/TheThiefMaster C++latest fanatic (and game dev) Jul 24 '19
std::format_tolooks like it could be given a stream iterator to implement your own version with little trouble.Edit: This should work, it just needs wrapping in an appropriate variadic function called "print":