[FR]: Remove public #include <iomanip>
include directives for build speed
#4329
Labels
#include <iomanip>
include directives for build speed
#4329
Does the feature exist in the most recent commit?
No.
Why do we need this feature?
As
<iomanip>
is not a common included file, its content is unlikely to be included in translation units other than through GoogleTest includes.By reducing the number of include directives public headers in GoogleTest, this may reduce the time taken to compile tests as it would reduce the amount of work that the preprocessor and compiler front-end need to do.
The C++ Compile Health Watchdog puts
<iomanip>
at ~100ms-200ms extra compilation cost.~0.45% of all preprocessing tokens in translation units in LLVM come from this
<iomanip>
include directive in GoogleTest. https://gist.github.com/IncludeGuardian/7e560c26783d5f11d7645c96db6b81d4#file-after-yaml-L4066-L4069Describe the proposal.
Move the includes of
<iomanip>
in public headers:googletest/googletest/include/gtest/gtest.h
Line 54 in 455fcb7
googletest/googletest/include/gtest/internal/gtest-internal.h
Line 61 in 455fcb7
and call the
precision
method instead of usingstd::setprecision
.Is the feature specific to an operating system, compiler, or build system version?
No.
The text was updated successfully, but these errors were encountered: