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 2017/12/08 16:09:44 UTC

Re: Review Request 63951: Added noexcept specifier to Option.

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


Fix it, then Ship it!





3rdparty/stout/include/stout/option.hpp
Lines 101 (patched)
<https://reviews.apache.org/r/63951/#comment271801>

    This condition is implied from the constructibility requirement. The standard doesn't specify these, for example.


- Michael Park


On Nov. 20, 2017, 6:38 a.m., Dmitry Zhuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63951/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2017, 6:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `noexcept` on move constructor and move assignment operator allows STL
> to use some optimizations, e.g. `std::vector` can move elements, when
> growing, rather than making copies.
> Specifically, `mesos::Resources::Resource_` generated constructor is
> deduced as `noexcept` after this change, improving performance of
> operations on `mesos::Resources`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/option.hpp 32133f95654b9367bce5c354142b0ae91146ec3d 
> 
> 
> Diff: https://reviews.apache.org/r/63951/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> Verified with
> ```
> static_assert(std::is_nothrow_move_constructible<mesos::Resources::Resource_>::value, "");
> ```
> before and after changes.
> 
> 
> Thanks,
> 
> Dmitry Zhuk
> 
>