[PATCH] D16360: unordered_map: Avoid unnecessary mallocs when no insert occurs

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 13:54:11 PDT 2016


r263746.

> On 2016-Mar-17, at 13:36, Duncan P. N. Exon Smith via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
>> 
>> On 2016-Mar-16, at 15:41, Eric Fiselier <eric at efcs.ca> wrote:
>> 
>> EricWF accepted this revision.
>> EricWF added a comment.
>> This revision is now accepted and ready to land.
>> 
>> LGTM after change in inline comment.
>> 
>> 
>> ================
>> Comment at: include/__hash_table:114
>> @@ +113,3 @@
>> +template <class _Pair, class _Key, class _First, class _Second>
>> +struct __can_extract_key<_Pair, _Key, pair<_First, _Second>>
>> +    : conditional<is_same<typename remove_const<_First>::type, _Key>::value,
>> ----------------
>> `>>` needs to be `> >` for C++03.
> 
> Since __can_extract_key is only used when !defined(_LIBCPP_CXX03_LANG),
> I'll just move it behind an #ifdef (and leave the prettier `>>`).
> 
> I'll commit after running the tests with -std=c++03.
> 
>> 
>> http://reviews.llvm.org/D16360
>> 
>> 
>> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list