Skip to content

Commit

Permalink
Removed the exception in the int convertion of the typeless_nan.
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-paul-mueller committed Nov 22, 2023
1 parent 93e86e6 commit a07eede
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dace/runtime/include/dace/nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

// Class to define a stateless NAN and related operators.

#include <cmath>
#include <stdexcept>

namespace dace
{
namespace math
Expand All @@ -15,10 +12,7 @@ namespace dace
// Defines a typeless Pi
struct typeless_nan
{
operator int() const
{
throw std::logic_error("Tried to convert a `NAN` into an `int`.");
}
operator int() const = delete;
operator float() const
{
return std::nanf("");
Expand Down

0 comments on commit a07eede

Please sign in to comment.