Skip to content

Commit

Permalink
Merge pull request #1560 from dermesser/pyne-isnan
Browse files Browse the repository at this point in the history
Fix minor compiler errors (macro expansion, duplicate `using`)
  • Loading branch information
gonuke committed Jun 24, 2021
2 parents 9b52839 + ada8bdb commit aa09e74
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions news/fix-macro-and-other-minor-errors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**Added:** None

**Changed:**
- In `src/pyne.h`, replace a macro `isnan()` with `using std::isnan`, as the former has led to undesired macro expansion in Boost header files.

**Deprecated:** None

**Removed:**
- A duplicate `using std::list` in `src/hdf5_back.cc.in`, which triggers compiler errors with some GCC versions.

**Fixed:**
- Issue #1312

**Security:** None
1 change: 0 additions & 1 deletion src/hdf5_back.cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ void Hdf5Back::CreateTable(Datum* d) {
using std::vector;
using std::list;
using std::pair;
using std::list;
using std::map;
Datum::Vals vals = d->vals();
hsize_t nvals = vals.size();
Expand Down
2 changes: 1 addition & 1 deletion src/pyne.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

#if (__GNUC__ >= 4)
#include <cmath>
#define isnan(x) std::isnan(x)
using std::isnan;
#else
#include <math.h>
#define isnan(x) __isnand((double)x)
Expand Down

0 comments on commit aa09e74

Please sign in to comment.