Ported and dramatically cleaned up the quadrature system. This includes centralizing all field definitions
17 lines
475 B
C++
17 lines
475 B
C++
#include "serif/utils/misc/finite.hpp"
|
|
#include "serif/utils/error/codes.hpp"
|
|
#include <limits>
|
|
|
|
namespace {
|
|
class test_exception : public std::runtime_error {
|
|
public:
|
|
test_exception(const std::string& message)
|
|
: std::runtime_error(message) {}
|
|
};
|
|
}
|
|
|
|
int main() {
|
|
double a = std::numeric_limits<double>::infinity();
|
|
|
|
serif::utils::misc::validate_finite<test_exception, serif::utils::errors::SERiFErrorCode::NON_FINITE_VALUE_ERROR>(a);
|
|
} |