aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
commit1f917f69ff07f09b6dbb670971f57f8efe718b84 (patch)
tree99293cbc1411737cd995dac10a99b2c40ef0944c /libcxx/include/vector
parent145449b1e420787bb99721a429341fa6be3adfb6 (diff)
downloadsrc-vendor/llvm-project/llvmorg-15-init-16436-g18a6ab5b8d1f.tar.gz
src-vendor/llvm-project/llvmorg-15-init-16436-g18a6ab5b8d1f.zip
Vendor import of llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f.vendor/llvm-project/llvmorg-15-init-16436-g18a6ab5b8d1f
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector68
1 files changed, 18 insertions, 50 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index f5c09011948d..14f586c9bfd7 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -393,16 +393,14 @@ public:
template <class _InputIterator>
vector(_InputIterator __first,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value,
_InputIterator>::type __last);
template <class _InputIterator>
vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value>::type* = 0);
@@ -465,10 +463,7 @@ public:
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
template <class _InputIterator>
- typename enable_if
- <
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value,
@@ -598,10 +593,7 @@ public:
iterator insert(const_iterator __position, size_type __n, const_reference __x);
template <class _InputIterator>
- typename enable_if
- <
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value,
@@ -1090,8 +1082,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
template <class _Tp, class _Allocator>
template <class _InputIterator>
vector<_Tp, _Allocator>::vector(_InputIterator __first,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value,
@@ -1105,8 +1096,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first,
template <class _Tp, class _Allocator>
template <class _InputIterator>
vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
value_type,
typename iterator_traits<_InputIterator>::reference>::value>::type*)
@@ -1301,10 +1291,7 @@ vector<_Tp, _Allocator>::operator=(const vector& __x)
template <class _Tp, class _Allocator>
template <class _InputIterator>
-typename enable_if
-<
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
_Tp,
typename iterator_traits<_InputIterator>::reference>::value,
@@ -1751,10 +1738,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_
template <class _Tp, class _Allocator>
template <class _InputIterator>
-typename enable_if
-<
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value &&
+typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
is_constructible<
_Tp,
typename iterator_traits<_InputIterator>::reference>::value,
@@ -2057,12 +2041,10 @@ public:
vector(size_type __n, const value_type& __v, const allocator_type& __a);
template <class _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value>::type* = 0);
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
template <class _InputIterator>
vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value>::type* = 0);
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
template <class _ForwardIterator>
vector(_ForwardIterator __first, _ForwardIterator __last,
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
@@ -2097,10 +2079,7 @@ public:
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
template <class _InputIterator>
- typename enable_if
- <
- __is_cpp17_input_iterator<_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value,
+ typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
void
>::type
assign(_InputIterator __first, _InputIterator __last);
@@ -2205,17 +2184,14 @@ public:
#if _LIBCPP_STD_VER > 11
template <class... _Args>
- _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator position, _Args&&... __args)
- { return insert ( position, value_type ( _VSTD::forward<_Args>(__args)... )); }
+ _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator __position, _Args&&... __args)
+ { return insert ( __position, value_type ( _VSTD::forward<_Args>(__args)... )); }
#endif
iterator insert(const_iterator __position, const value_type& __x);
iterator insert(const_iterator __position, size_type __n, const value_type& __x);
template <class _InputIterator>
- typename enable_if
- <
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value,
+ typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
iterator
>::type
insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
@@ -2522,8 +2498,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const all
template <class _Allocator>
template <class _InputIterator>
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value>::type*)
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
__cap_alloc_(0, __default_init_tag())
@@ -2549,8 +2524,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
template <class _Allocator>
template <class _InputIterator>
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value>::type*)
+ typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
__cap_alloc_(0, static_cast<__storage_allocator>(__a))
@@ -2787,10 +2761,7 @@ vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
template <class _Allocator>
template <class _InputIterator>
-typename enable_if
-<
- __is_cpp17_input_iterator<_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value,
+typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
void
>::type
vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
@@ -2941,10 +2912,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
template <class _Allocator>
template <class _InputIterator>
-typename enable_if
-<
- __is_cpp17_input_iterator <_InputIterator>::value &&
- !__is_cpp17_forward_iterator<_InputIterator>::value,
+typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
typename vector<bool, _Allocator>::iterator
>::type
vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)