[libcxx-commits] [libcxx] [libc++] P2165R4: Update deduction guides for map containers and container adaptors (PR #136011)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 19 11:00:20 PDT 2025
================
@@ -466,6 +467,18 @@ using __has_exactly_bidirectional_iterator_category _LIBCPP_NODEBUG =
template <class _InputIterator>
using __iter_value_type _LIBCPP_NODEBUG = typename iterator_traits<_InputIterator>::value_type;
+#if _LIBCPP_STD_VER >= 23
+template <class _InputIterator>
+using __iter_key_type _LIBCPP_NODEBUG = __remove_const_t<tuple_element_t<0, __iter_value_type<_InputIterator>>>;
----------------
frederick-vs-ja wrote:
Yes, I've verified that the uses of `__iter_key_type`, `__iter_mapped_type`, and `__iter_to_alloc_type` in libc++ exactly match the uses of _`iter-key-type`_, _`iter-mapped-type`_, and _`iter-to-alloc-type`_ in the standard wording.
https://github.com/llvm/llvm-project/pull/136011
More information about the libcxx-commits
mailing list