bombela / backward-cpp

A beautiful stack trace pretty printer for C++
MIT License
3.73k stars 471 forks source link

C++17 compilation #198

Closed hshakula closed 3 years ago

hshakula commented 3 years ago

Hi, I'm trying to use backward-cpp in my project that uses the C++17 standard. In C++17 std::set_unexpected was removed. And due to header implementation of SignalHandling for windows (implementation), I cannot compile it.

I see such potential fixes:

or

I would do for the first one. Or there are some reasons why SignalHandling was implemented in the header?

bombela commented 3 years ago

It is in the header because backward.cpp is merely an example of use.

Is it possible to make it work without the deprecated item?

On Sun, 6 Dec 2020, 04:23 George Shakula, notifications@github.com wrote:

Hi, I'm trying to use backward-cpp in my project that uses the C++17 standard. In C++17 std::set_unexpected was removed https://en.cppreference.com/w/cpp/error/set_unexpected. And due to header implementation of SignalHandling for windows ( implementation https://github.com/bombela/backward-cpp/blob/27a89004a86fe2a665f041c198c7fbab7489e278/backward.hpp#L4249), I cannot compile it.

I see such potential fixes:

or

  • Putting std::set_unexpected under ifdef that checks for C++ version.

I would do for the first one. Or there are some reasons why SignalHandling was implemented in the header?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bombela/backward-cpp/issues/198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUZDD5QMVHL4WSBRPXBBLSTNZVVANCNFSM4UPI77UA .