You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Benjamin Hindman <be...@berkeley.edu> on 2014/01/18 20:38:36 UTC

Review Request 17089: Refactored implicit conversions of Some, None, and Error.

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

Review request for mesos, Ben Mahler and Jie Yu.


Repository: mesos-git


Description
-------

Also added conversion constructors for Option, Try, and Result. This is cleaner and will allow us to more easily capture rvalue references when constructing Option, Try, and Result from Some, None, and Error.

Note that this makes https://reviews.apache/org/r/17078 unnecessary and hence can be discarded.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp b08ae509bd162e2e64878221801cb5ef7adf961e 
  3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp e95ced47a933fbc5eab2733ba5aeb4d95338d47a 
  3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp 43bc2a5fbe7aa0b7c5df2ac50dfd3e259e76c65a 
  3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 432a12ba0e373acd65e56eb4b2be0f25b6ab3f6b 
  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp cf2b2431d6c3ca8919cc7cea74c373ac35e71ab9 
  3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp 885a4aeb58b1a622480413eca7527d98593e4a77 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp b02d354712d493b330548264f510aa5787905843 

Diff: https://reviews.apache.org/r/17089/diff/


Testing
-------

make check


Thanks,

Benjamin Hindman


Re: Review Request 17089: Refactored implicit conversions of Some, None, and Error.

Posted by Benjamin Hindman <be...@berkeley.edu>.

> On Jan. 19, 2014, 7:03 p.m., Jie Yu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp, line 30
> > <https://reviews.apache.org/r/17089/diff/1/?file=430135#file430135line30>
> >
> >     Ditto here. Why we need a type _Some?

We need the _Some intermediate type so that you don't have to explicitly call out the template type. Otherwise, you'd have to do 'Some<int>(42)' instead of just 'Some(42)'.


- Benjamin


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


On Jan. 18, 2014, 7:38 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17089/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2014, 7:38 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Also added conversion constructors for Option, Try, and Result. This is cleaner and will allow us to more easily capture rvalue references when constructing Option, Try, and Result from Some, None, and Error.
> 
> Note that this makes https://reviews.apache/org/r/17078 unnecessary and hence can be discarded.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp b08ae509bd162e2e64878221801cb5ef7adf961e 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp e95ced47a933fbc5eab2733ba5aeb4d95338d47a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp 43bc2a5fbe7aa0b7c5df2ac50dfd3e259e76c65a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 432a12ba0e373acd65e56eb4b2be0f25b6ab3f6b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp cf2b2431d6c3ca8919cc7cea74c373ac35e71ab9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp 885a4aeb58b1a622480413eca7527d98593e4a77 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp b02d354712d493b330548264f510aa5787905843 
> 
> Diff: https://reviews.apache.org/r/17089/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 17089: Refactored implicit conversions of Some, None, and Error.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17089/#review32262
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp
<https://reviews.apache.org/r/17089/#comment60999>

    Ditto here. Why we need a type _Some?


- Jie Yu


On Jan. 18, 2014, 7:38 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17089/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2014, 7:38 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Also added conversion constructors for Option, Try, and Result. This is cleaner and will allow us to more easily capture rvalue references when constructing Option, Try, and Result from Some, None, and Error.
> 
> Note that this makes https://reviews.apache/org/r/17078 unnecessary and hence can be discarded.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp b08ae509bd162e2e64878221801cb5ef7adf961e 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp e95ced47a933fbc5eab2733ba5aeb4d95338d47a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp 43bc2a5fbe7aa0b7c5df2ac50dfd3e259e76c65a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 432a12ba0e373acd65e56eb4b2be0f25b6ab3f6b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp cf2b2431d6c3ca8919cc7cea74c373ac35e71ab9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp 885a4aeb58b1a622480413eca7527d98593e4a77 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp b02d354712d493b330548264f510aa5787905843 
> 
> Diff: https://reviews.apache.org/r/17089/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 17089: Refactored implicit conversions of Some, None, and Error.

Posted by Benjamin Hindman <be...@berkeley.edu>.

> On Jan. 20, 2014, 10:55 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp, line 30
> > <https://reviews.apache.org/r/17089/diff/1/?file=430135#file430135line30>
> >
> >     Ditto Jie's comment, looks like a leftover from your intermediate attempt?
> >     
> >     Comments in this file would be nice too. :)

See my comment above.


- Benjamin


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


On Jan. 18, 2014, 7:38 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17089/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2014, 7:38 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Also added conversion constructors for Option, Try, and Result. This is cleaner and will allow us to more easily capture rvalue references when constructing Option, Try, and Result from Some, None, and Error.
> 
> Note that this makes https://reviews.apache/org/r/17078 unnecessary and hence can be discarded.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp b08ae509bd162e2e64878221801cb5ef7adf961e 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp e95ced47a933fbc5eab2733ba5aeb4d95338d47a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp 43bc2a5fbe7aa0b7c5df2ac50dfd3e259e76c65a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 432a12ba0e373acd65e56eb4b2be0f25b6ab3f6b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp cf2b2431d6c3ca8919cc7cea74c373ac35e71ab9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp 885a4aeb58b1a622480413eca7527d98593e4a77 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp b02d354712d493b330548264f510aa5787905843 
> 
> Diff: https://reviews.apache.org/r/17089/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 17089: Refactored implicit conversions of Some, None, and Error.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17089/#review32324
-----------------------------------------------------------

Ship it!


Modulo issues below.


3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp
<https://reviews.apache.org/r/17089/#comment61064>

    This needs updating. :)



3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp
<https://reviews.apache.org/r/17089/#comment61065>

    Comments on how one is to use None?



3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp
<https://reviews.apache.org/r/17089/#comment61066>

    Ditto Jie's comment, looks like a leftover from your intermediate attempt?
    
    Comments in this file would be nice too. :)


- Ben Mahler


On Jan. 18, 2014, 7:38 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17089/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2014, 7:38 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Also added conversion constructors for Option, Try, and Result. This is cleaner and will allow us to more easily capture rvalue references when constructing Option, Try, and Result from Some, None, and Error.
> 
> Note that this makes https://reviews.apache/org/r/17078 unnecessary and hence can be discarded.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp b08ae509bd162e2e64878221801cb5ef7adf961e 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp e95ced47a933fbc5eab2733ba5aeb4d95338d47a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp 43bc2a5fbe7aa0b7c5df2ac50dfd3e259e76c65a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 432a12ba0e373acd65e56eb4b2be0f25b6ab3f6b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp cf2b2431d6c3ca8919cc7cea74c373ac35e71ab9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp 885a4aeb58b1a622480413eca7527d98593e4a77 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp b02d354712d493b330548264f510aa5787905843 
> 
> Diff: https://reviews.apache.org/r/17089/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>