-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Boost Future #108
Comments
Hey, We would also like to test Unfortunately boost's exception handling in promises/futures is somewhat different than std's, which causes exceptions to be thrown with wrong types when I was looking at So I wanted to ask, is there any reason to mark classes |
I use IIRC, Boost's implementation of this stuff is supposed to resemble the Standard Library fairly closely. What version of Boost are you using that you see the problems? |
I use version from ubuntu 18.04 repos (which is 1.65.1), and I believe I did a quick test with debian 10 (1.67) On the other hand they do mention this behaviour in their documentation
I am not sure which compilers do implement what is needed, but gcc 7.4.0 from ubuntu 18.04 repos did throw mentioned |
Bit of guesswork here: Boost's "as close as possible" might be pretty bad in this situation because the exception classes are marked |
The suggestion on that to be to see if removing |
While I was trying to understand this issue, I have written myself a quick, small program to test boost exception handling. Notice I tested that on
I got output:
So it seems like |
That's a good, simple test case with a rather surprising output...I suspect my understanding of
Perhaps it needs |
So I decided to dig a little bit deeper. When When Looking at declaration of boost::exception_detail::clone_current_exception() it is obvious, that without When boost::enable_current_exception() is used we can see that the type is wrapped in So it seems that, for gcc or clang or any other non-msvc compiler
Correct me if I am wrong, but it seems like apart from |
There should be a way to use
boost::future<T>
andboost::promise<T>
forzk::future<T>
andzk::promise<T>
. Something along the lines ofcmake -DZKPP_BUILD_SETTING_FUTURE=BOOST_THREAD ..
. While we're here, better documentation for how to use alternative future implementations.This will help give a better answer to #107.
The text was updated successfully, but these errors were encountered: