El 04/11/2025 a las 21:08, Andrey Semashev via Boost escribió:
On 4 Nov 2025 22:19, Peter Dimov via Boost wrote:
Mungo Gill wrote:
In case anyone is curious how to implement support for <format> in boost::string_view by delegating to the formatter for std::string_view: https://godbolt.org/z/YsWKrEz3P
There's no way to portably forward-declare things in std (even if we discount the fact that this is explicitly called out as undefined behavior.)
Although this is true, we also have utilities for doing this in all widespread implementations, and some Boost libraries already forward-declare std components:
https://godbolt.org/z/GrEY377qb
I wish this utility was made more public.
I just replied with the same content, we are somehow synchronized. We could also have a VERY lightweight library, properly tested, something like: https://github.com/olegpublicprofile/stdfwd Best, Ion