> On Feb. 27, 2019, 8:14 p.m., Benjamin Bannier wrote: > > 3rdparty/stout/include/stout/option.hpp > > Lines 127 (patched) > > <https://reviews.apache.org/r/70067/diff/1/?file=2127187#file2127187line127> > > > > I feel we should disable this one for rvalues (which should also have > > been done for `T* operator->`). > > ``` > > T& operator*() & { return get(); } > > ``` > > Meng Zhu wrote: > Thanks for reviewing! I added rvalue versions for `*`. (except `Result` > where a todo is added to add ref-qualified `get()` first). > > Looking at the `std::optional` > (https://en.cppreference.com/w/cpp/utility/optional/operator*), both are > allowed. Though I cannot think of a compelling use case, probably just for > completeness.
Marking this and similar issues below as fixed. Please reopen if you wanted to discuss anything else. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70067/#review213266 ----------------------------------------------------------- On Feb. 27, 2019, 7:15 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70067/ > ----------------------------------------------------------- > > (Updated Feb. 27, 2019, 7:15 p.m.) > > > Review request for mesos, Benjamin Bannier and Benjamin Mahler. > > > Bugs: MESOS-7124 > https://issues.apache.org/jira/browse/MESOS-7124 > > > Repository: mesos > > > Description > ------- > > Added star operator for `Result`, `Try` and `Option`. > > > Diffs > ----- > > 3rdparty/stout/include/stout/option.hpp > 8feed012a55fed6eab89c883958324f3345e46e9 > 3rdparty/stout/include/stout/result.hpp > c1387ae957edffc31250b9b236b5f1fd8ff0acd3 > 3rdparty/stout/include/stout/try.hpp > 30cce7e27fa040d0ce5a86efc4820f8c39178444 > 3rdparty/stout/tests/option_tests.cpp > 815d40e0bf342998634dc69a1719c3f717c7202c > 3rdparty/stout/tests/result_tests.cpp > 1750e6b4a90afec3b7de0621779f8b69a856da41 > 3rdparty/stout/tests/try_tests.cpp 99b7b2a3f968abb87549fb9075d65bc5bcc827f1 > > > Diff: https://reviews.apache.org/r/70067/diff/3/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
