pyne / pyne

PyNE: The Nuclear Engineering Toolkit
http://pyne.io/
Other
261 stars 176 forks source link

Redefinition of std::isnan results in compiler errors #1501

Closed akoen closed 8 months ago

akoen commented 8 months ago

Describe the Bug
By redefining isnan as std::isnan in utils.h, any further usage of std::isnan is translated to std::std::isnan, which errors. This can cause compilation to fail in libraries that require pyne, like DAGMC. It would be best to define a new internal function/macro, perhaps pyne_isnan. https://github.com/pyne/pyne/blob/8c17fa9c1f2a08d0968d89f7b6bb70e773ed7cb9/src/utils.h#L30

For inspiration see MOAB's moab_isfinite(f)

image

welcome[bot] commented 8 months ago

Hi, and welcome to PyNE! :wave: Thanks for opening your first issue. We recommend that you include information such as the version of PyNE you're working with (eg, develop branch or a specific version), the platform you are operating on, the expected behavior, and the actual behavior you are bringing our attention to. The more deatil you provide, the better others in this community will be able to help you.