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


I am not really sure this is the way to go in order to create a case insensite 
hashmap. The class `hashmap` simply adds functionality to the 
`boost::unordered_map`. If one checks the API for the latter, the way needed to 
create an insensitive hashmap is to override the template parameters `Hash` and 
`Pred`. So I think it would be better simply to expose them in hashmap changin 
`stout/hashmpa.hpp` to:

```cpp
template <typename Key, typename Value, typename Hash = boost::hash<Key>, 
typename Pred = std::equal_to<Key>>
class hashmap : public boost::unoredered_map<Key, Value, Hash, Pred>
{
  …
};
```

The you only need to define functors that provide insensitive operatiosn for 
`Hash` and `Pred` and finally a typedef.

- Alexander Rojas


On May 3, 2015, 11:37 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33792/
> -----------------------------------------------------------
> 
> (Updated May 3, 2015, 11:37 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-328
>     https://issues.apache.org/jira/browse/MESOS-328
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add InsensitiveHashMap.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 79239d738d0607364f8c3d7addfd54a642bdffc0 
>   3rdparty/libprocess/3rdparty/stout/include/stout/insensitivehashmap.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/insensitivehashmap_tests.cpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33792/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to