mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rukletsov <ruklet...@gmail.com>
Subject Re: Review Request 68224: Augmented `Statistics` to work with any collection.
Date Thu, 09 Aug 2018 14:20:46 GMT


> On Aug. 6, 2018, 10:59 a.m., Benno Evers wrote:
> > 3rdparty/libprocess/include/process/statistics.hpp
> > Lines 60 (patched)
> > <https://reviews.apache.org/r/68224/diff/1/?file=2068399#file2068399line65>
> >
> >     Aren't you missing a `::value` after `std::is_same<>`, assuming you're
going for SFINAE here?
> >     
> >     Also, what's the reason for being so strict? Shouldn't `std::is_convertible<>`
be enough?

`std::enable_if` was indeed missing. Thanks!


> On Aug. 6, 2018, 10:59 a.m., Benno Evers wrote:
> > 3rdparty/libprocess/include/process/statistics.hpp
> > Lines 68 (patched)
> > <https://reviews.apache.org/r/68224/diff/1/?file=2068399#file2068399line73>
> >
> >     I wonder if we should just reserve `std::distance(first, last)` if we don't
get `InputIterator`s. 
> >     
> >     Intuitively it feels like even in the worst case, doing an additional iteration
should be faster than the additional memory allocations.

Yeah, we can reserve always.


- Alexander


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


On Aug. 9, 2018, 2:20 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68224/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2018, 2:20 p.m.)
> 
> 
> Review request for mesos, Benno Evers and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/statistics.hpp e9f1fc23bf83f92a2e7de94dba0df48272cc3394

>   3rdparty/libprocess/src/tests/statistics_tests.cpp a2a780bf9de018c823b68aa48977fd9fd1b8a064

> 
> 
> Diff: https://reviews.apache.org/r/68224/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


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