Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#442 closed defect (fixed)

isfinite not in scope using cmath on os x

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

Description (last modified by mloskot)

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 (8)

comment:1 by mloskot, 13 years ago

Description: modified (diff)
Version: 3.0.3svn-trunk

comment:2 by mloskot, 13 years ago

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

comment:3 by strk, 13 years ago

Owner: changed from geos-devel@… to strk
Status: newassigned

Note that this was broken by r3362

comment:4 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in r3365 -- test welcome

comment:5 by strk, 13 years ago

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

comment:6 by Sandro Santilli <strk@…>, 7 years ago

In de3c6be9/git:

Do not assume isfinite is in std:: namespace to fix #444; Have RobustDeterminant use a broad 'using namespace std' to fix #442 in another way.

git-svn-id: http://svn.osgeo.org/geos/trunk@3370 5242fede-7e19-0410-aef8-94bd7d2200fb

comment:7 by Sandro Santilli <strk@…>, 7 years ago

In de3c6be9/git:

Do not assume isfinite is in std:: namespace to fix #444; Have RobustDeterminant use a broad 'using namespace std' to fix #442 in another way.

git-svn-id: http://svn.osgeo.org/geos/trunk@3370 5242fede-7e19-0410-aef8-94bd7d2200fb

comment:8 by Sandro Santilli <strk@…>, 7 years ago

In de3c6be9/git:

Do not assume isfinite is in std:: namespace to fix #444; Have RobustDeterminant use a broad 'using namespace std' to fix #442 in another way.

git-svn-id: http://svn.osgeo.org/geos/trunk@3370 5242fede-7e19-0410-aef8-94bd7d2200fb

Note: See TracTickets for help on using tickets.