Skip to content

Commit

Permalink
Fix compilation error with C++17 compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
hshakula committed Dec 21, 2020
1 parent 27a8900 commit 0b4483f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#define BACKWARD_CXX11
#define BACKWARD_ATLEAST_CXX11
#define BACKWARD_ATLEAST_CXX98
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
#define BACKWARD_ATLEAST_CXX17
#endif
#else
#define BACKWARD_CXX98
#define BACKWARD_ATLEAST_CXX98
Expand Down Expand Up @@ -4246,7 +4249,9 @@ class SignalHandling {
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);

std::set_terminate(&terminator);
#ifndef BACKWARD_ATLEAST_CXX17
std::set_unexpected(&terminator);
#endif
_set_purecall_handler(&terminator);
_set_invalid_parameter_handler(&invalid_parameter_handler);
}
Expand Down

0 comments on commit 0b4483f

Please sign in to comment.