X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2FTry-inl.h;h=711c1a0905278f3d56a705563604a86fc6f51d50;hp=e70fce72c8d807e50ad3beb79732d50ab0e68dc1;hb=17c08956e0c46684e3a3a9d3b5e9bc733a09c0ea;hpb=374d408bcd0283dffd5b0bec78685bc17e567c43 diff --git a/folly/Try-inl.h b/folly/Try-inl.h index e70fce72..711c1a09 100644 --- a/folly/Try-inl.h +++ b/folly/Try-inl.h @@ -117,6 +117,12 @@ const T& Try::value() const & { return value_; } +template +const T&& Try::value() const && { + throwIfFailed(); + return std::move(value_); +} + template void Try::throwIfFailed() const { switch (contains_) {