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

Issue 2072713002: Made rtc::Optional a bit more like std::optional. (Closed)

Created:
4 years, 6 months ago by ossu
Modified:
3 years, 10 months ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Made rtc::Optional a bit more like std::optional. Its value constructors are now implicit (i.e. const& T and T&&). std::optional in C++17 is constexpr, but this isn't possible yet. Equality and inequality comparisons can now compare directly with values; if the Optional is empty, it's not equal to any value.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M webrtc/base/optional.h View 2 chunks +18 lines, -2 lines 2 comments Download

Messages

Total messages: 12 (2 generated)
ossu
Was using a rtc::Optional a bit in a different CL and noticed it was missing ...
4 years, 6 months ago (2016-06-16 13:35:38 UTC) #3
tommi
(not adding myself as reviewer, just a question) https://codereview.webrtc.org/2072713002/diff/1/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/2072713002/diff/1/webrtc/base/optional.h#newcode65 webrtc/base/optional.h:65: Optional(const ...
4 years, 6 months ago (2016-06-16 16:08:22 UTC) #4
kwiberg-webrtc
I agree that this CL makes Optional more useful, but... Chromium has an Optional type ...
4 years, 6 months ago (2016-06-16 17:26:43 UTC) #5
tommi
On 2016/06/16 17:26:43, kwiberg-webrtc wrote: > I agree that this CL makes Optional more useful, ...
4 years, 6 months ago (2016-06-16 21:35:49 UTC) #6
kwiberg-webrtc
On 2016/06/16 21:35:49, tommi-webrtc wrote: > On 2016/06/16 17:26:43, kwiberg-webrtc wrote: > > I agree ...
4 years, 6 months ago (2016-06-17 07:17:37 UTC) #7
ossu
On 2016/06/17 07:17:37, kwiberg-webrtc wrote: > On 2016/06/16 21:35:49, tommi-webrtc wrote: > > On 2016/06/16 ...
4 years, 6 months ago (2016-06-17 07:58:18 UTC) #8
kwiberg-webrtc
On 2016/06/17 07:58:18, ossu wrote: > On 2016/06/17 07:17:37, kwiberg-webrtc wrote: > > On 2016/06/16 ...
4 years, 6 months ago (2016-06-17 08:14:31 UTC) #9
ossu
Alright, I've put up a separate CL importing a slightly modified version of Optional from ...
4 years, 6 months ago (2016-06-17 14:16:52 UTC) #10
tommi
On 2016/06/17 14:16:52, ossu wrote: > Alright, I've put up a separate CL importing a ...
4 years, 6 months ago (2016-06-17 15:10:36 UTC) #11
ossu
3 years, 10 months ago (2017-02-21 16:57:49 UTC) #12
On 2016/06/17 15:10:36, tommi (webrtc) wrote:
> On 2016/06/17 14:16:52, ossu wrote:
> > Alright, I've put up a separate CL importing a slightly modified version of
> > Optional from Chromium here:
> > https://codereview.webrtc.org/2071003003/
> > 
> > I'll close this CL when/if that one lands.
> 
> ok, plan sgtm.

I'll close this one now. I'll look at following up the CL above with a more
recent version of Optional.

Powered by Google App Engine
This is Rietveld 408576698