-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
xbt_assert(this->value_);
T* result = value_;
value_ = nullptr;
- return *value_;
+ return *result;
}
private:
class Future {
public:
Future() = default;
- Future(std::shared_ptr<FutureState<T>> state): state_(std::move(state)) {}
+ Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
// Move type:
Future(Future&) = delete;