diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2019-06-10 21:28:23 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2019-06-10 21:28:23 +0000 |
| commit | edfe8525de1f7278f4754f2bffd47b13ec291a17 (patch) | |
| tree | 41c69b48200121a2679e97b51074a43947800f1d /libcxx/include/iterator | |
| parent | f62e23d901dfbfdcc2fb2b3f7e0f38c98ffb1e59 (diff) | |
| download | bcm5719-llvm-edfe8525de1f7278f4754f2bffd47b13ec291a17.tar.gz bcm5719-llvm-edfe8525de1f7278f4754f2bffd47b13ec291a17.zip | |
Implement deduction guides for map/multimap. Reviewed as https://reviews.llvm.org/D58587. Thanks to Quuxplusone for the submission.
llvm-svn: 362986
Diffstat (limited to 'libcxx/include/iterator')
| -rw-r--r-- | libcxx/include/iterator | 16 |
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 |

