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


Please take a look at my comments in https://reviews.apache.org/r/37188/

Please note my comments for hashmap may also be applicable for the other 
containers modified.


3rdparty/libprocess/3rdparty/stout/include/stout/cache.hpp (line 46)
<https://reviews.apache.org/r/37187/#comment152181>

    You can trim the extra whitespace `> >` to `>>` now.



3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp (line 38)
<https://reviews.apache.org/r/37187/#comment152186>

    Did you want to allow the allocator to be specified? `class Allocator = 
std::allocator<std::pair<const Key, T>>`
    
    Should we wait to add this until it is needed?



3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp (lines 50 - 59)
<https://reviews.apache.org/r/37187/#comment152184>

    So now can we just use:
    ```
    std::unordered_map<Key, Elem, Hash, Equal>(map.begin(), map.end(), 
std::ceil(map.size() / max_load_factor())) {}
    ```
    
    Here and below.
    
    Please see my note in https://reviews.apache.org/r/35874/



3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp (lines 107 - 109)
<https://reviews.apache.org/r/37187/#comment152187>

    ```
    auto result = std::unordered_map<Key, Value, Hash, Equal>::emplace(key, 
value);
    
    // If the element already existed, replace it.
    if (!result.second) {
      *result.first = value;
    }
    ```



3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp (lines 116 - 119)
<https://reviews.apache.org/r/37187/#comment152189>

    @Mpark Will turning this into a ternary aid RVO?


- Joris Van Remoortere


On Aug. 25, 2015, 4:02 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37187/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2015, 4:02 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Michael Park.
> 
> 
> Bugs: MESOS-3217
>     https://issues.apache.org/jira/browse/MESOS-3217
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Changed hashmap, hashset to use std::unordered_{set,map} instead of 
> boost::unordered_{set,map}.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/cache.hpp 
> 25684a405bfa9c4ab65641568341652a8efaf925 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 
> ecab60a21765c58b0732de747509aa6382d31c06 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashset.hpp 
> 2dd1905a4626a7d7e9f61863c8290ae1cdb9b925 
>   3rdparty/libprocess/3rdparty/stout/include/stout/multihashmap.hpp 
> a8573ed67e20b5206afd69bab4f5dc094a7e882f 
>   3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp 
> e8ebe0b2f5e49657ee191a2535e0abdaf8e665ce 
>   3rdparty/libprocess/3rdparty/stout/tests/hashset_tests.cpp 
> 3802a29b82da57217dd75c6b1611fd21c91cfc03 
>   3rdparty/libprocess/3rdparty/stout/tests/multimap_tests.cpp 
> b625ffaeb3672f58fbd9558a868f87404e659c53 
> 
> Diff: https://reviews.apache.org/r/37187/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>

Reply via email to