On 03/06/15 21:56 +0200, François Dumont wrote:
Hi
Here is a patch to add heterogeneous lookup to alternative modes.
Excellent.
To do so I had to expose __is_transparent as __has_is_transparent to
avoid confilct with existing __is_transparent.
That's a better name, thanks.
Should I put it in
__detail namespace ?
Could it just be protected instead of at namespace scope?
If it can't be protected it's OK here you put it, it doesn't need to
be in __detail.
But maybe we should rename the _Kt parameter of __hash_is_transparent
to _Unused, _Dummy or something like that. It only exists to make the
specialization dependent on a template argument of the functions that
use it.
* include/bits/stl_tree.h (_Rb_tree<>::__is_transparent<>): Move to
outer scope and rename in ...
"rename to ..."
(std::__hash_is_transparent<>): ... this.
In <bits/stl_set.h> ...
@@ -429,12 +477,34 @@
std::pair<const_iterator,const_iterator>
equal_range(const key_type& __x) const
{
- std::pair<_Base_iterator, _Base_iterator> __res =
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
_Base::equal_range(__x);
return std::make_pair(const_iterator(__res.first, this),
const_iterator(__res.second, this));
}
Huh! Did calls to this function even compile before this fix?
OK for trunk, thanks.