summaryrefslogtreecommitdiffstats
path: root/libcxx/include/iterator
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-06-20 19:32:00 +0000
committerLouis Dionne <ldionne@apple.com>2019-06-20 19:32:00 +0000
commitf2f7d72f0052b169433790d79e06b5160325c538 (patch)
tree7ecdf34ae66c507b4b0129c01c0413e03291a07e /libcxx/include/iterator
parente0c1c3baf90d86ae9b83859790359c67f4e70bdd (diff)
downloadbcm5719-llvm-f2f7d72f0052b169433790d79e06b5160325c538.tar.gz
bcm5719-llvm-f2f7d72f0052b169433790d79e06b5160325c538.zip
[libc++] Take 2: Implement CTAD for map and multimap
This is a re-application of r362986 (which was reverted in r363688) with fixes for the issue that caused it to be reverted. Thanks to Arthur O'Dwyer for the patch. Differential Revision: https://reviews.llvm.org/D58587 llvm-svn: 363968
Diffstat (limited to 'libcxx/include/iterator')
-rw-r--r--libcxx/include/iterator16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/include/iterator b/libcxx/include/iterator
index e73b4b713ed..30801ea83db 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -538,6 +538,22 @@ struct __is_exactly_input_iterator
__has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value &&
!__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value> {};
+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+template<class _InputIterator>
+using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;
+
+template<class _InputIterator>
+using __iter_key_type = remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;
+
+template<class _InputIterator>
+using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type;
+
+template<class _InputIterator>
+using __iter_to_alloc_type = pair<
+ add_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>,
+ typename iterator_traits<_InputIterator>::value_type::second_type>;
+#endif
+
template<class _Category, class _Tp, class _Distance = ptrdiff_t,
class _Pointer = _Tp*, class _Reference = _Tp&>
struct _LIBCPP_TEMPLATE_VIS iterator
OpenPOWER on IntegriCloud