You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Kapil Arya <ka...@mesosphere.io> on 2014/10/21 00:53:42 UTC
Review Request 26955: Created a Result(Try&) constructor for
Result.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26955/
-----------------------------------------------------------
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
Re: Review Request 26955: Created a Result(Try&) constructor for
Result.
Posted by Niklas Nielsen <ni...@qni.dk>.
-----------------------------------------------------------
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
>
>
Re: Review Request 26955: Created a Result(Try&) constructor for
Result.
Posted by Kapil Arya <ka...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26955/
-----------------------------------------------------------
(Updated Oct. 20, 2014, 7:31 p.m.)
Review request for mesos, Benjamin Hindman and Niklas Nielsen.
Changes
-------
Addressed Nik's comments.
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 (updated)
-----
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