You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Michael Park <mp...@apache.org> on 2016/01/05 23:38:57 UTC

Review Request 41946: Added a `Representation` abstraction to stout.

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

Review request for mesos and Benjamin Hindman.


Repository: mesos


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 

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


Testing
-------


Thanks,

Michael Park


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Michael Park <mp...@apache.org>.

> On Jan. 6, 2016, 9:51 a.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp, line 66
> > <https://reviews.apache.org/r/41946/diff/2/?file=1183573#file1183573line66>
> >
> >     Seems like an `explicit` ctr is good enough here, right? Otherwise `/* implicit */` would show that this is intentional.

I used `reference_wrapper` to implement this, which has an implicit constructor. I think its default behavior is fine for us?


- Michael


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


On Jan. 6, 2016, 10 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41946/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 10 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41946/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Michael Park <mp...@apache.org>.

> On Jan. 6, 2016, 9:51 a.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp, line 67
> > <https://reviews.apache.org/r/41946/diff/2/?file=1183573#file1183573line67>
> >
> >     Any reason you did not delete the ctr from `T&&`?

Used `reference_wrapper` which deletes it.


- Michael


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


On Jan. 6, 2016, 10 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41946/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 10 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41946/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Benjamin Bannier <be...@mesosphere.io>.

> On Jan. 6, 2016, 10:51 a.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp, line 76
> > <https://reviews.apache.org/r/41946/diff/2/?file=1183573#file1183573line76>
> >
> >     Would it make sense to add an r-value ref qualifier here to effectively make non-temporary `References` unusable? At least it would alleviate some cases of lifetime mismatches between `value` and it's `Representation`.

No, it would not make sense since you use `Representation` instances as l-values. Sorry for the noise.


- Benjamin


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


On Jan. 6, 2016, 3:48 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41946/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 3:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41946/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41946/#review113033
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 66)
<https://reviews.apache.org/r/41946/#comment173524>

    Seems like an `explicit` ctr is good enough here, right? Otherwise `/* implicit */` would show that this is intentional.



3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 67)
<https://reviews.apache.org/r/41946/#comment173526>

    Any reason you did not delete the ctr from `T&&`?



3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 76)
<https://reviews.apache.org/r/41946/#comment173529>

    Would it make sense to add an r-value ref qualifier here to effectively make non-temporary `References` unusable? At least it would alleviate some cases of lifetime mismatches between `value` and it's `Representation`.


- Benjamin Bannier


On Jan. 6, 2016, 3:48 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41946/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 3:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41946/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41946/
-----------------------------------------------------------

(Updated Jan. 15, 2016, 6:36 a.m.)


Review request for mesos and Benjamin Hindman.


Changes
-------

Addressed BenH's comments.


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am f32493f90f3bc2a62119dcea49eb5f4966388bf5 
  3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 

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


Testing
-------


Thanks,

Michael Park


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41946/#review114401
-----------------------------------------------------------

Ship it!


LGTM, but see issues on documentation and comments please.

This is a really nice addition MPark, thank you! Are you also going to follow up and replace our current `RFC*` implemenetations too?


3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 36)
<https://reviews.apache.org/r/41946/#comment175240>

    Can you document why you need this please? What happens if you don't add this?



3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 58)
<https://reviews.apache.org/r/41946/#comment175242>

    { on newline please.



3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp (line 68)
<https://reviews.apache.org/r/41946/#comment175241>

    Why do you need this? Can you add a comment please?


- Benjamin Hindman


On Jan. 6, 2016, 10 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41946/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 10 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41946/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41946/
-----------------------------------------------------------

(Updated Jan. 6, 2016, 10 p.m.)


Review request for mesos and Benjamin Hindman.


Changes
-------

Used `reference_wrapper` which also disallows binding rvalues.


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
  3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 

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


Testing
-------


Thanks,

Michael Park


Re: Review Request 41946: Added a `Representation` abstraction to stout.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41946/
-----------------------------------------------------------

(Updated Jan. 6, 2016, 2:48 a.m.)


Review request for mesos and Benjamin Hindman.


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
  3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp PRE-CREATION 

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


Testing
-------


Thanks,

Michael Park