mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Nielsen" <...@qni.dk>
Subject Re: Review Request 26955: Created a Result(Try&) constructor for Result<T>.
Date Mon, 20 Oct 2014 23:25:57 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26955/#review57462
-----------------------------------------------------------

Ship it!


LGTM modulo comments below


3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/26955/#comment98158>

    Let's do this as an initializer list instead :-)



3rdparty/libprocess/3rdparty/stout/tests/result_tests.cpp
<https://reviews.apache.org/r/26955/#comment98162>

    You are testing explicit vs implicit construction right? Can you update the comment to
reflect that?


- Niklas Nielsen


On Oct. 20, 2014, 3:53 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26955/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 3:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Try<T> doesn't have a default constructor and so it's not possible to have
> a Try<T> class member variable  unless we initialize it with
> Error().
> 
> With this patch, we can instead have a Result<T> class member variable
> which is initialized to None() and can be assigned a Try<T> type.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 256df0bb5557ebe6c75099d35c284804c9e57253 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 125b3fad35674e5198c9119d19972635a468a0c8

>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 631f126ff2fee6e536056602ea5be0fe89837094

>   3rdparty/libprocess/3rdparty/stout/tests/result_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/26955/diff/
> 
> 
> Testing
> -------
> 
> Added result_tests.cpp and ran make check.
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message