diff options
author | Jamie Liu <jamieliu@google.com> | 2018-12-11 17:04:42 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-11 17:05:53 -0800 |
commit | a2c868a098fcb51dcdf629045c5f5c0f68c2766f (patch) | |
tree | 2c1f2c35e3a8033a50b08fe31a32a5b03c901db5 /test/util/proc_util.h | |
parent | 24c1158b9c21f7f8b7126e810d623a518422052e (diff) |
Add rvalue ref-qualified PosixErrorOr<T>::ValueOrDie() overloads.
This allows ValueOrDie() to be called on PosixErrorOr rvalues (e.g.
temporaries) holding move-only types without extraneous std::move()s.
PiperOrigin-RevId: 225098036
Change-Id: I662862e4f3562141f941845fc6e197edb27ce29b
Diffstat (limited to 'test/util/proc_util.h')
-rw-r--r-- | test/util/proc_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/util/proc_util.h b/test/util/proc_util.h index f8021d92e..e1ee2db9c 100644 --- a/test/util/proc_util.h +++ b/test/util/proc_util.h @@ -115,7 +115,7 @@ MATCHER_P(ContainsMappings, mappings, return false; } - auto maps = std::move(maps_or.ValueOrDie()); + auto maps = std::move(maps_or).ValueOrDie(); // Does maps contain all elements in mappings? The comparator ignores // the major, minor, and inode fields. |