lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 858d037 09/13: Include appropriate headers, a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 858d037 09/13: Include appropriate headers, and say why they're included
Date: Fri, 9 Apr 2021 18:42:37 -0400 (EDT)

branch: master
commit 858d037fc4f0fa3f2d0a32014025c1eb14c66e93
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Include appropriate headers, and say why they're included
---
 round_to.hpp      | 4 ++--
 round_to_test.cpp | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/round_to.hpp b/round_to.hpp
index 4502878..2339732 100644
--- a/round_to.hpp
+++ b/round_to.hpp
@@ -28,10 +28,10 @@
 #include "mc_enum_type_enums.hpp"       // enum rounding_style
 #include "stl_extensions.hpp"           // nonstd::power()
 
-#include <cmath>
+#include <cmath>                        // fabs(), floor(), rint()
 #include <limits>
 #include <stdexcept>
-#include <type_traits>
+#include <type_traits>                  // is_floating_point_v
 #include <vector>
 
 // Round a floating-point number to a given number of decimal places,
diff --git a/round_to_test.cpp b/round_to_test.cpp
index 41d0b1c..3b331ca 100644
--- a/round_to_test.cpp
+++ b/round_to_test.cpp
@@ -31,9 +31,12 @@
 #include <algorithm>                    // max()
 #include <cfloat>                       // DECIMAL_DIG
 #include <climits>                      // INT_MIN
+#include <cmath>                        // fabs()
 #include <ios>
 #include <iostream>
+#include <limits>
 #include <ostream>
+#include <stdexcept>
 
 // Print name of software rounding style for diagnostics.
 char const* get_name_of_style(rounding_style style)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]