- 31 Jan, 2018 1 commit
-
-
Dan Elphick authored
This allows base::nullopt to be used instead of base::Optional<Foo>() and implicit conversion to Optional<T> from T. Also added NOLINT comments to the implicit constructors. Change-Id: I4c688045685e2a50e0c0d38a959570f77454ec61 Reviewed-on: https://chromium-review.googlesource.com/893268Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#51003}
-
- 09 Jun, 2017 1 commit
-
-
Clemens Hammacher authored
base::Optional is a replacement for std::optional, until we switch to C++17 and can use std::optional directly. The implementation is copied from chromium's base::Optional, but put in the {v8::base} namespace instead of just {base}. Also, the specialization of std::hash for base::Optional is omitted, since it's disallowed in the style guide. A first use in the AsmJsParser is introduced, if that one sticks, I will refactor more uses of std::unique_ptr to use base::Optional instead, avoiding the heap allocation. R=mstarzinger@chromium.org BUG=v8:6474 Change-Id: I019599d4bf9ff0105bf592dfb96d6050feba18ae Reviewed-on: https://chromium-review.googlesource.com/528884 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#45810}
-