You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing singnificantly slower compilation times when including fmt/format.h with a single trivial fmt::format(“hello {}”, 5) use, as compared to fmt/core.h. However, since i would like to do FMT_STRING() validation at compile time, i am forced to include the format.h header. The compilation time goes up regardless of using the macro. Is there any way that i could have compile time format string checking, without the steep compilation time penalty? I tried on several recent gcc versions and saw the same compilation time hit. Any guidance on this is appreciated.
The text was updated successfully, but these errors were encountered:
Compile-time checks require all of the format string parsing logic from fmt/format.h. You could speed up your builds by using precompiled headers or by only enabling checks in CI or some other build mode, e.g.
// helper header:
#if CI
# include<fmt/format.h>
#else
# include<fmt/core.h>
# defineFMT_STRING(s) s
#endif
I am seeing singnificantly slower compilation times when including fmt/format.h with a single trivial fmt::format(“hello {}”, 5) use, as compared to fmt/core.h. However, since i would like to do FMT_STRING() validation at compile time, i am forced to include the format.h header. The compilation time goes up regardless of using the macro. Is there any way that i could have compile time format string checking, without the steep compilation time penalty? I tried on several recent gcc versions and saw the same compilation time hit. Any guidance on this is appreciated.
The text was updated successfully, but these errors were encountered: