mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Re: Review Request 63951: Added noexcept specifier to Option.
Date Fri, 08 Dec 2017 16:09:44 GMT

-----------------------------------------------------------
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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message