Skip to content

Commit

Permalink
20765: Turns off several exceptions in universal initialization (#165)
Browse files Browse the repository at this point in the history
Disables several exceptions that are being suppressed by Python up the
stack but are affecting the Evolver: FE_INEXACT, FE_DIVBYZERO,
FE_UNDERFLOW, FE_OVERFLOW, and FE_INVALID.
  • Loading branch information
apbassett authored Jul 3, 2024
1 parent 046e134 commit 2dcdd36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Amalgam/PlatformSpecific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@
#include <algorithm>
#include <array>
#include <cctype>
#include <cfenv>
#include <codecvt>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>

//perform universal initialization
class PlatformSpecificStartup
{
public:
PlatformSpecificStartup()
{
std::feclearexcept(FE_ALL_EXCEPT);
}
};
PlatformSpecificStartup _platform_specific_startup;

#ifdef OS_WINDOWS

// TODO 15993: disable std::wstring_convert deprecation warning: no replacement in C++17 so
Expand Down

0 comments on commit 2dcdd36

Please sign in to comment.