mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 53252: Added `hashset` constructor for type that supports `begin()/end()`.
Date Mon, 30 Jan 2017 21:21:13 GMT

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




3rdparty/stout/include/stout/hashset.hpp (lines 74 - 80)
<https://reviews.apache.org/r/53252/#comment235026>

    `std::set` already defines a constructor taking a range, so I'd suggest not reimplementing
it here, but instead to simply inherit the base class' constructors,
    
        using std::unordered_set<Elem, Hash, Equal>::unordered_set;
        
    Note that this makes the constructor taking an `std::initializer_list` redundant, so it
should be removed.
        
    Note that this would allow us to simplify existing constructors with even less typing,
e.g.,
    
        hashset(const std::set& set) : hashset(set.begin(), set.end()) {}
        
    and similar.


- Benjamin Bannier


On Oct. 28, 2016, 7:12 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53252/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2016, 7:12 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Jie Yu, Qian Zhang, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6035
>     https://issues.apache.org/jira/browse/MESOS-6035
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add `hashset` constructor for any arbitrary type that supports
> `begin()` and `end()`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/hashset.hpp 8f633cad4d27c1e5f391279b7f3e8cb5fbf4bd03 
> 
> Diff: https://reviews.apache.org/r/53252/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>


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