mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rojas <alexan...@mesosphere.io>
Subject Re: Review Request 63292: Added lamdba::zip.
Date Tue, 07 Nov 2017 15:26:39 GMT

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




3rdparty/stout/include/stout/lambda.hpp
Lines 168 (patched)
<https://reviews.apache.org/r/63292/#comment267599>

    why not use a `std::tuple` instead of `std::pair`? that will allow to expand this function
eventually to any number of inputs.



3rdparty/stout/include/stout/lambda.hpp
Lines 209-221 (patched)
<https://reviews.apache.org/r/63292/#comment267604>

    Why not replace this with:
    
    ```c++
      std::unordered_map<U1, U2> output;
      auto contents = zipto<std::vector>(input1, input2);
      std::copy(
          std::begin(contents),
          std::end(contents),
          std::inserter(output, std::begin(output)));
      return output;
    ```
    
    If we had ranges we could even get away without `contents`.


- Alexander Rojas


On Oct. 25, 2017, 12:03 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63292/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2017, 12:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added lamdba::zip.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/lambda.hpp a61d97b69e7eebd057c94148d39c6e1fc3066017 
>   3rdparty/stout/tests/lambda_tests.cpp ad8c2efddb6b64184670d0cfb33188ef843351ab 
> 
> 
> Diff: https://reviews.apache.org/r/63292/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


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