OrcaSlicer/src/libslic3r/TryCatchSignal.hpp
lane.wei 1555904bef Add the full source of BambuStudio
using version 1.0.10
2022-07-15 23:42:08 +08:00

20 lines
353 B
C++

#ifndef TRY_CATCH_SIGNAL_HPP
#define TRY_CATCH_SIGNAL_HPP
#ifdef _MSC_VER
#include "TryCatchSignalSEH.hpp"
#else
#include <csignal>
using SignalT = decltype (SIGSEGV);
template<class TryFn, class CatchFn, int N>
void try_catch_signal(const SignalT (&/*sigs*/)[N], TryFn &&fn, CatchFn &&/*cfn*/)
{
fn();
}
#endif
#endif // TRY_CATCH_SIGNAL_HPP