lewissbaker / cppcoro

A library of C++ coroutine abstractions for the coroutines TS
MIT License
3.43k stars 472 forks source link

C++20 removed std::uncaught_exception #143

Open QuellaZhang opened 4 years ago

QuellaZhang commented 4 years ago

std::uncaught_exception was deprecated in C++17 and removed in C++20. In /std:c++17 mode, this triggers a deprecation warning in recent versions of MSVC. In /std:c++latest mode, now that microsoft/STL#380 has been merged, this will trigger an error in VS 2019 16.6 Preview 2.

The next release msvc toolset will emit the following error: F:\gitP\lewissbaker\cppcoro\test\doctest\doctest.h(4407): error C2039: 'uncaught_exception': is not a member of 'std' F:\gitP\lewissbaker\cppcoro\test\doctest\doctest.h(4407): error C3861: 'uncaught_exception': identifier not found

lewissbaker commented 4 years ago

In the vs2019 branch I have updated the doctest header to a more recent version which suppresses the deprecation warning for its use of std::uncaught_exception().