You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joris Van Remoortere <jo...@gmail.com> on 2015/04/30 18:22:49 UTC
Re: Review Request 32838: Use unrestricted union to remove dynamic
allocation from Option.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32838/
-----------------------------------------------------------
(Updated April 30, 2015, 4:22 p.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, Cody Maloney, and Michael Park.
Bugs: MESOS-1991
https://issues.apache.org/jira/browse/MESOS-1991
Repository: mesos
Description
-------
Refactor `Option<T>` to use unrestricted union to remove dynamic allocation.
This depends on the upgrade to GCC 4.8+
I used `std::remove_const<T>::type` to remove the const from `T` when storing `T` in the union, so that we can properly in-place new from outside the initializer list for this case:
`Option<const T> opt;`
Diffs
-----
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 47fe92c380de3e2abc625dc936afbd034280b76a
Diff: https://reviews.apache.org/r/32838/diff/
Testing
-------
make check
Thanks,
Joris Van Remoortere
Re: Review Request 32838: Use unrestricted union to remove dynamic
allocation from Option.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32838/#review82158
-----------------------------------------------------------
Patch looks great!
Reviews applied: [32837, 33558, 33572, 33193, 32838]
All tests passed.
- Mesos ReviewBot
On April 30, 2015, 4:22 p.m., Joris Van Remoortere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32838/
> -----------------------------------------------------------
>
> (Updated April 30, 2015, 4:22 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Cody Maloney, and Michael Park.
>
>
> Bugs: MESOS-1991
> https://issues.apache.org/jira/browse/MESOS-1991
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Refactor `Option<T>` to use unrestricted union to remove dynamic allocation.
> This depends on the upgrade to GCC 4.8+
> I used `std::remove_const<T>::type` to remove the const from `T` when storing `T` in the union, so that we can properly in-place new from outside the initializer list for this case:
> `Option<const T> opt;`
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 47fe92c380de3e2abc625dc936afbd034280b76a
>
> Diff: https://reviews.apache.org/r/32838/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Joris Van Remoortere
>
>
Re: Review Request 32838: Use unrestricted union to remove dynamic
allocation from Option.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32838/#review82200
-----------------------------------------------------------
Ship it!
Ship It!
- Ben Mahler
On April 30, 2015, 4:22 p.m., Joris Van Remoortere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32838/
> -----------------------------------------------------------
>
> (Updated April 30, 2015, 4:22 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Cody Maloney, and Michael Park.
>
>
> Bugs: MESOS-1991
> https://issues.apache.org/jira/browse/MESOS-1991
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Refactor `Option<T>` to use unrestricted union to remove dynamic allocation.
> This depends on the upgrade to GCC 4.8+
> I used `std::remove_const<T>::type` to remove the const from `T` when storing `T` in the union, so that we can properly in-place new from outside the initializer list for this case:
> `Option<const T> opt;`
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 47fe92c380de3e2abc625dc936afbd034280b76a
>
> Diff: https://reviews.apache.org/r/32838/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Joris Van Remoortere
>
>