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




3rdparty/stout/include/stout/path.hpp
Lines 388 (patched)
<https://reviews.apache.org/r/71878/#comment306970>

    This feels a bit more "common" to me:
    
        struct PathComponentIterator {
            // ..
        };
        
        typedef const PathComponentIterator const_iterator;
        
    What do you think?



3rdparty/stout/include/stout/path.hpp
Lines 389 (patched)
<https://reviews.apache.org/r/71878/#comment306968>

    Using `std::iterator` is going to be deprecated in C++17, apparently the 
preferred alternative is to just create typedefs for `value_type`, etc. in the 
iterator class directly.



3rdparty/stout/include/stout/path.hpp
Lines 391 (patched)
<https://reviews.apache.org/r/71878/#comment306971>

    Shouldn't `value_type` be `std::string`? (or the `string_view`-like class 
from the TODO below)



3rdparty/stout/include/stout/path.hpp
Lines 437 (patched)
<https://reviews.apache.org/r/71878/#comment306973>

    I think this needs to be a loop, consider e.g. `/home/foo////bar`



3rdparty/stout/include/stout/path.hpp
Lines 454 (patched)
<https://reviews.apache.org/r/71878/#comment306972>

    Should we also check `path == other.path`? Or maybe even `CHECK(path == 
other.path)`?



3rdparty/stout/include/stout/path.hpp
Lines 469 (patched)
<https://reviews.apache.org/r/71878/#comment306974>

    I don't completely understand why we need a sentinel, isn't `path->end()` 
suitable for everything we need to do?



3rdparty/stout/include/stout/path.hpp
Lines 479 (patched)
<https://reviews.apache.org/r/71878/#comment306969>

    Why not store a `Path*` here? Then we would not need to have an extra copy 
of `separator` in the iterator.


- Benno Evers


On Dec. 5, 2019, 12:48 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71878/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2019, 12:48 p.m.)
> 
> 
> Review request for mesos and Benno Evers.
> 
> 
> Bugs: MESOS-10062
>     https://issues.apache.org/jira/browse/MESOS-10062
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added iteration support to stout's Path.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/path.hpp 
> ba1f665ce94b9636d88a7ecce8643c56758f7b5c 
>   3rdparty/stout/tests/path_tests.cpp 
> 19dd910a534040468aeb48f15ebdf56dff32bc15 
> 
> 
> Diff: https://reviews.apache.org/r/71878/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>

Reply via email to