I watched Barry Revzin's talk on Formatting Ranges that was very interesting. I see the feature status page that Formatting Ranges is still planned for C++23, ad it says clang has implemented it.
But when I try some of Barry's examples on godbolt(with -std=c++2b), I get compiler errors, and today getting core dumps.
Plus when Googling around, I don't see many talking about it. I don't even see much on cppreference?
Understandably the release isn't complete, but seems odd that documentation is lacking, and nobody is taking about it?
Range formatting is a part of C++23 and documented at cppreference.
Your pair example is incorrect since pairs don't support format specifications for their elements which is why it won't compile even with libc++ that claims to implement range formatting. libstdc++ and Microsoft STL don't (fully) support range formatting yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With