aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/span
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-10 17:53:52 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-10 17:53:52 +0300
commit5c64b97bb7e4034eff8833e4c367f61d34fcb4ee (patch)
tree7c5769528f2fcdaa5a718aa73e4aa64d50905269 /contrib/libs/cxxsupp/libcxx/include/span
parent1b56f620ac98766b198121ca1b728e7e61efbb56 (diff)
downloadydb-5c64b97bb7e4034eff8833e4c367f61d34fcb4ee.tar.gz
intermediate changes
ref:4635f4dd763168c3fa295f87727595c785b4d5a4
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/span')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/span20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/span b/contrib/libs/cxxsupp/libcxx/include/span
index 5d57bd693c..d10cb73805 100644
--- a/contrib/libs/cxxsupp/libcxx/include/span
+++ b/contrib/libs/cxxsupp/libcxx/include/span
@@ -61,7 +61,7 @@ public:
template <class It, class End>
constexpr explicit(Extent != dynamic_extent) span(It first, End last);
template <size_t N>
- constexpr span(element_type (&arr)[N]) noexcept;
+ constexpr span(type_identity_t<element_type> (&arr)[N]) noexcept;
template <size_t N>
constexpr span(array<value_type, N>& arr) noexcept;
template <size_t N>
@@ -89,7 +89,7 @@ public:
// [span.obs], span observers
constexpr size_type size() const noexcept;
constexpr size_type size_bytes() const noexcept;
- constexpr bool empty() const noexcept;
+ [[nodiscard]] constexpr bool empty() const noexcept;
// [span.elem], span element access
constexpr reference operator[](size_type idx) const;
@@ -264,7 +264,7 @@ public:
{ (void)__l; _LIBCPP_ASSERT(_Extent == distance(__f, __l), "size mismatch in span's constructor (ptr, ptr)"); }
#endif
- _LIBCPP_INLINE_VISIBILITY constexpr span(element_type (&__arr)[_Extent]) noexcept : __data{__arr} {}
+ _LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
template <class _OtherElementType,
enable_if_t<is_convertible_v<_OtherElementType(*)[], element_type (*)[]>, nullptr_t> = nullptr>
@@ -374,9 +374,9 @@ public:
return {data() + __offset, __count};
}
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return _Extent; }
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return _Extent * sizeof(element_type); }
- _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return _Extent == 0; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return _Extent; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return _Extent * sizeof(element_type); }
+ [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return _Extent == 0; }
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{
@@ -469,7 +469,7 @@ public:
template <size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(element_type (&__arr)[_Sz]) noexcept : __data{__arr}, __size{_Sz} {}
+ constexpr span(type_identity_t<element_type> (&__arr)[_Sz]) noexcept : __data{__arr}, __size{_Sz} {}
template <class _OtherElementType, size_t _Sz,
enable_if_t<is_convertible_v<_OtherElementType(*)[], element_type (*)[]>, nullptr_t> = nullptr>
@@ -560,9 +560,9 @@ public:
return {data() + __offset, __count};
}
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return __size; }
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return __size * sizeof(element_type); }
- _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size == 0; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return __size; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return __size * sizeof(element_type); }
+ [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size == 0; }
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{