[libcxx-commits] [libcxx] [libc++] P2165R4: Update deduction guides for map containers and container adaptors (PR #136011)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 19 12:12:40 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>>>;
----------------
philnik777 wrote:

I am aware that the original used the private version. That's purely due to necessity though. Not using the private version when we don't have to avoids cargo-culting.

https://github.com/llvm/llvm-project/pull/136011


More information about the libcxx-commits mailing list