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



LGTM and is a very nice C++11 update in the spirit of the original 
`BOOST_FOREACH` (e.g., the creative use of 6.4.3 :D).

Would you mind updating `stout/tests/foreach_tests.cpp` as well? It currently 
doesn't seem to test this, and it also should be updated to test e.g., 
iterating rvalues, or move-only key or value types.


3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (line 19)
<https://reviews.apache.org/r/46165/#comment192316>

    Not necessarily an issue, but this does include a lot of preprocessor 
definitions just to have `BOOST_PP_CAT` from `boost/preprocessor/cat.hpp` 
available. I think we could potentially make this more light-weight by directly 
using `BOOST_PP_CAT` instead of `CAT`.



3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (line 66)
<https://reviews.apache.org/r/46165/#comment192321>

    This one is subtle as in principle we could use a moved-from 
`FOREACH_ELEM`. This happens for cases where the `begin_expr` returns an rvalue 
in violation of general iterator requirements (e.g., that the result of `*it` 
is assignable).
    
    Could you explain why we'd need to `forward` here and above in the first 
place? I appears we should be able to just `get` directly from the 
`FOREACH_ELEM` in scope.


- Benjamin Bannier


On April 13, 2016, 11:58 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46165/
> -----------------------------------------------------------
> 
> (Updated April 13, 2016, 11:58 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Hindman, Ben Mahler, and 
> Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3214
>     https://issues.apache.org/jira/browse/MESOS-3214
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp 
> 7fb0044790ee249b69e07b81a26851bd5bfb110f 
> 
> Diff: https://reviews.apache.org/r/46165/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to