lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 747840b 3/3: Remove a workaround for a pre-C+


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 747840b 3/3: Remove a workaround for a pre-C++98 compiler
Date: Tue, 2 Apr 2019 07:23:55 -0400 (EDT)

branch: master
commit 747840b7b6e625c0d04ad87f0d30b19b88e61205
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove a workaround for a pre-C++98 compiler
---
 zero_test.cpp | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/zero_test.cpp b/zero_test.cpp
index 4de26fe..d8d32b6 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -110,16 +110,8 @@ struct e_former_rounding_problem
 int test_main(int, char*[])
 {
     // Test use with function.
-    //
-    // This would be more natural:
-    //  root_type r = decimal_root(0.5, 5.0, bias_none, 9, e_function);
-    // but borland compilers reject it:
-    //  Could not find a match for
-    //  'decimal_root<FunctionalType>(double,double,root_bias,int,double 
(*)(double))'
-    // even though 14.8.2.4/9 says T(*)(T) is deducible.
-
-    double(*f)(double) = e_function;
-    root_type r = decimal_root(0.5, 5.0, bias_none, 9, f);
+
+    root_type r = decimal_root(0.5, 5.0, bias_none, 9, e_function);
     BOOST_TEST(root_is_valid == r.second);
 
     // Test use with function object.



reply via email to

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