fix assigning exception to future

This commit is contained in:
Avi Kivity
2014-08-18 00:22:55 +03:00
parent 216ac3cdf0
commit ef749bf26c

View File

@@ -138,7 +138,7 @@ struct future_state {
void set_exception(std::exception_ptr ex) {
assert(_state == state::future);
_state = state::exception;
new (&_u.ex) std::exception(ex);
new (&_u.ex) std::exception_ptr(ex);
make_ready();
}
T get() {