[libcxx-commits] [libcxx] [libc++][print] Includes <format>. (PR #76333)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 29 04:14:41 PST 2024
zmodem wrote:
> I had a patch for this https://reviews.llvm.org/D157298, but that was not well liked to do at a large scale. This patch was due to an earlier size increment due to `format` in `vector`. Btw I asked about this issue a while ago in a DM on Discourse, did you see that message?
Sorry, I'm not usually on Discourse so I must have missed that message.
>
> I'm happy to revisit this idea, but then it would be good to have some performance numbers. These number seem worse than the vector case. Maybe instead of doing fine-grained "header removal" we could only remove the "heavy hitters".
>From what I understand that patch was based around the idea of gating includes on language version. While it would help some users for a while, it's really just postponing the problem until folks move to the next -std=c++ version.
Another idea would be gating all the format stuff behind an #ifdef (and similar for other features), but that could also result in a huge matrix of different modes to support, so I can see why that wouldn't be desirable.
Ultimately, I wish the standard provided more granular headers, so that users of basic ostream functionality wouldn't have to pay the cost of the new formatting features.
https://github.com/llvm/llvm-project/pull/76333
More information about the libcxx-commits
mailing list