Ticket #442 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

isfinite not in scope using cmath on os x

Reported by: jklowden Owned by: strk
Priority: major Milestone:
Component: Default Version: svn-trunk
Severity: Unassigned Keywords:
Cc:

Description (last modified by mloskot) (diff)

The following patch allows compilation on a modern mac.

 Index: src/algorithm/RobustDeterminant.cpp
 ===================================================================
 --- src/algorithm/RobustDeterminant.cpp (revision 3364)
 +++ src/algorithm/RobustDeterminant.cpp (working copy)
 @@ -23,6 +23,7 @@
  #include <geos/util/IllegalArgumentException.h>

  #include <cmath>
 +using std::isfinite;

  #include <geos/platform.h> // for ISNAN, FINITE

I know this line was removed a mere 28 hours ago. I'm not sure how platform.h might be changed instead; it's very messy.

Change History

Changed 2 years ago by mloskot

  • version changed from 3.0.3 to svn-trunk
  • description modified (diff)

Changed 2 years ago by mloskot

Try this

#if defined(HAVE_STD_ISFINITE)
   using std::isfinite;
#endif

or

#if defined(HAVE_STD_ISFINITE)
   using std::isfinite;
#endif

It is very messy indeed.

I would like to see solve it using/as in Boost.Math  fpclassify.hpp

Changed 2 years ago by strk

  • owner changed from geos-devel@… to strk
  • status changed from new to assigned

Note that this was broken by r3362

Changed 2 years ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

Should be fixed in r3365 -- test welcome

Changed 2 years ago by strk

r3370 tries in another way, hopefully saner (see #444)

Note: See TracTickets for help on using tickets.