C++ Logo


Advanced search

Re: Is there any hope of getting more granular std lib (e.g. chrono is currently huge compile hit even when I need only small part of it)

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Mon, 11 Oct 2021 22:13:05 -0400
I'm not sure it's reasonable to put time and effort into solving a
problem that C++ already has a feature that is designed specifically
to solve:


Now yes, it's very unfortunate that C++20 did not standardize modules
for the standard library. But as a tool to reduce compile times due to
header inclusion, modules already work. Given appropriate compiler
support (which is admittedly thin on the ground, but you're suggesting
a change for C++23, so we should assume compilers and build tools for
C++20 are finished), `import <chrono>` should solve your problems.

Received on 2021-10-11 21:13:17