> On March 2, 2019, 3:24 p.m., Benjamin Mahler wrote: > > 3rdparty/stout/tests/option_tests.cpp > > Lines 137 (patched) > > > > > > this doesn't test that moving is working correctly? Can we test to ensure that this operator lets just move? > > > > ``` > > Option> moved = {{1,1}}; > > > > hashmap map = *std::move(moved); > > > > // Expect moved is empty > > // Expect map is {1,1} > > ``` > > Benjamin Bannier wrote: > Hmm, is there anything in the standard promising that the source of a `move` gets emptied out? I am not sure adding an expectation related to `move`. > > Meng Zhu wrote: > I do not think we need to test content after the move, just need to test the returned content of the `*` which the code has already tested. Dropping, Bmahler please feel free to re-open if you think otherwise. As it stands, the test would compile if it actually was copying instead of moving? Or no? Seems prudent to test a move is actually occurring, if there's nothing in std containers to rely on w.r.t post-move invariants, we can just have our own struct that stores a boolean indicating that it's been moved and we can test that to make sure the move actually occurs? - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70067/#review213350 ----------------------------------------------------------- On March 4, 2019, 10:50 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70067/ > ----------------------------------------------------------- > > (Updated March 4, 2019, 10:50 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/4/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >