diff options
author | Elliot Goodrich <elliotgoodrich@gmail.com> | 2023-08-03 20:22:23 (GMT) |
---|---|---|
committer | Elliot Goodrich <elliotgoodrich@gmail.com> | 2023-08-03 21:14:38 (GMT) |
commit | 9ef5e8226919b56d6760b48258e706d819409994 (patch) | |
tree | 04e2826e5f7317a241eaa4b81e3dd90126efa57d /googletest/include | |
parent | cc366710bbf40a9816d47c35802d06dbaccb8792 (diff) | |
download | googletest-9ef5e8226919b56d6760b48258e706d819409994.zip googletest-9ef5e8226919b56d6760b48258e706d819409994.tar.gz googletest-9ef5e8226919b56d6760b48258e706d819409994.tar.bz2 |
Remove public includes of `<iomanip>`refs/pull/4330/head
This commit removes `<iomanip>` from public GoogleTest header files.
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.
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/gtest.h | 9 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-internal.h | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 86777c8..894f1e0 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -51,7 +51,6 @@ #include <cstddef> #include <cstdint> -#include <iomanip> #include <limits> #include <memory> #include <ostream> @@ -1574,12 +1573,12 @@ AssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression, } ::std::stringstream lhs_ss; - lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) - << lhs_value; + lhs_ss.precision(std::numeric_limits<RawType>::digits10 + 2); + lhs_ss << lhs_value; ::std::stringstream rhs_ss; - rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) - << rhs_value; + rhs_ss.precision(std::numeric_limits<RawType>::digits10 + 2); + rhs_ss << rhs_value; return EqFailure(lhs_expression, rhs_expression, StringStreamToString(&lhs_ss), StringStreamToString(&rhs_ss), diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 317894e..e5cfa44 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -58,7 +58,6 @@ #include <cstdint> #include <functional> -#include <iomanip> #include <limits> #include <map> #include <set> |