Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Issue 2942203002: Add has_value() and value() methods to rtc::Optional. (Closed)

Created:
3 years, 6 months ago by terelius
Modified:
3 years, 6 months ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, kwiberg-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add has_value() and value() methods to rtc::Optional. These methods have the same behavior as their counterparts in std::optional, except that rtc::Optional::value() requires that the value exists whereas std::optional::value() throws an exception. BUG=webrtc:7843 Review-Url: https://codereview.webrtc.org/2942203002 Cr-Commit-Position: refs/heads/master@{#18631} Committed: https://chromium.googlesource.com/external/webrtc/+/f79dbadc09255c91b9163449dfa8898a8be29744

Patch Set 1 #

Total comments: 2

Patch Set 2 : Reorder declarations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -4 lines) Patch
M webrtc/base/optional.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M webrtc/base/optional_unittest.cc View 6 chunks +36 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
terelius
3 years, 6 months ago (2017-06-16 12:46:35 UTC) #4
kwiberg-webrtc
lgtm, but see comment https://codereview.webrtc.org/2942203002/diff/1/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/2942203002/diff/1/webrtc/base/optional.h#newcode247 webrtc/base/optional.h:247: } The preceding functions all ...
3 years, 6 months ago (2017-06-16 12:53:41 UTC) #5
terelius
https://codereview.webrtc.org/2942203002/diff/1/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/2942203002/diff/1/webrtc/base/optional.h#newcode247 webrtc/base/optional.h:247: } On 2017/06/16 12:53:41, kwiberg-webrtc wrote: > The preceding ...
3 years, 6 months ago (2017-06-16 12:59:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2942203002/20001
3 years, 6 months ago (2017-06-16 13:46:05 UTC) #13
commit-bot: I haz the power
3 years, 6 months ago (2017-06-16 13:48:21 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/external/webrtc/+/f79dbadc09255c91b9163449d...

Powered by Google App Engine
This is Rietveld 408576698