projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Improve folly::RequestContext onSet and onUnset efficiency
[folly.git]
/
folly
/
Try-inl.h
diff --git
a/folly/Try-inl.h
b/folly/Try-inl.h
index e70fce72c8d807e50ad3beb79732d50ab0e68dc1..711c1a0905278f3d56a705563604a86fc6f51d50 100644
(file)
--- a/
folly/Try-inl.h
+++ b/
folly/Try-inl.h
@@
-117,6
+117,12
@@
const T& Try<T>::value() const & {
return value_;
}
+template <class T>
+const T&& Try<T>::value() const && {
+ throwIfFailed();
+ return std::move(value_);
+}
+
template <class T>
void Try<T>::throwIfFailed() const {
switch (contains_) {