EricWF added a comment. Adding inline comments for the implementation. Comments on the tests to follow shortly.
================ Comment at: include/__hash_table:103 @@ -102,1 +102,3 @@ +template <class _ValTy, class _Key> +struct __extract_key; ---------------- Could you make `__extract_key` behave the same way as `__can_extract_key` where we apply the `__uncvref<ValTy>` instead of expecting the user to? ================ Comment at: include/__hash_table:110 @@ +109,3 @@ + : is_same< + typename remove_const<typename remove_reference<_ValTy>::type>::type, + _Key> {}; ---------------- Assuming we can't be passed volatile types (I'll double check that). Then we should just use `is_same<_RawValTy, _Key>` ================ Comment at: include/__hash_table:113 @@ +112,3 @@ +template <class _Key> +struct __extract_key<_Key, _Key> { + const _Key &operator()(const _Key &__key) { return __key; } ---------------- Please keep the `__can_extract_key` and `__extract_key` specializations together. ================ Comment at: include/__hash_table:124 @@ +123,3 @@ +}; +template <class _Key, class _Second> +struct __extract_key<pair<const _Key, _Second>, _Key> { ---------------- Add a newline before this class definition. http://reviews.llvm.org/D16360 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits