-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add range_formatter
#4642
Add range_formatter
#4642
Conversation
tests/std/tests/P2286R8_text_formatting_range_formatter/test.cpp
Outdated
Show resolved
Hide resolved
Addresses microsoft#4631
Verified that the new test coverage fails without the fix.
tests/std/tests/P2286R8_text_formatting_range_formatter/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P2286R8_text_formatting_range_formatter/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P2286R8_text_formatting_range_formatter/test.cpp
Outdated
Show resolved
Hide resolved
Thanks, this is super awesome! 😻 I pushed a bunch of nitpicky changes, plus one bugfix and test coverage for it. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
I had to push an additional commit to dramatically reduce compiler memory consumption (and improve test throughput) by reducing the number of input ranges being tested. Memory consumption was a severe problem for the MSVC-internal mirror for a couple of reasons:
Together, this imposed a 4 GB limit, and With my changes, MSVC-internal compiler memory consumption (as measured by This also dramatically improved test throughput. On the GitHub side, with my physical machine and the x64-native compiler, test execution time dropped from 114 seconds to 18 seconds, a delicious 6.3x speedup. |
Thanks for this significant step in one of the last remaining C++23 features! 😻 📈 ⭐ |
used by pair, tuple, (...)
comment from_Fill_align_and_width_specs
- it no longer serves its purpose._Fill_align_and_width_specs_setter<T>::_Specs
member variable protected, so that we can create derived_Range_specs_setter
.range_formatter
:range_formatter::format
can be used at runtime only if format context's output iterator isback_insert_iterator<_Fmt_buffer<T>>
. Creation of nestedbasic_format_context
requires copying format args from oldcontext<X>
tocontext<Y>
andX
andY
have to be the same type to do this. This should not be a problem anyway, sincebasic_format_context
can be constructed only by the standard library.