Permalink
Browse files

added explicit conversion operator for Future<T>& -> T&&

  • Loading branch information...
evaleev committed Jan 11, 2018
1 parent 11035a4 commit 9db084c75750766277d887f1eb4948dee8d8bcc9
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/madness/world/future.h
@@ -709,6 +709,14 @@ namespace madness {
return std::move(get());
}
/// An rvalue analog of \c get().
/// \return An rvalue reference to the value.
/// \internal Rationale: this makes possible to move the value from a mutable assigned future.
inline explicit operator T&&() & {
return std::move(get());
}
/// Returns a structure used to pass references to another process.
/// This is used for passing pointers/references to another

0 comments on commit 9db084c

Please sign in to comment.