74template<
typename T>
class Span {
92 constexpr Span() =
default;
99 template<
typename U, BLI_ENABLE_IF((is_span_convertible_po
inter_v<U, T>))>
128 template<
typename U, BLI_ENABLE_IF((is_span_convertible_po
inter_v<U, T>))>
158 const int64_t new_size = std::max<int64_t>(0, std::min(
size,
size_ - start));
174 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
185 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
229 constexpr std::reverse_iterator<const T *>
rbegin()
const
231 return std::reverse_iterator<const T *>(this->
end());
233 constexpr std::reverse_iterator<const T *>
rend()
const
235 return std::reverse_iterator<const T *>(this->
begin());
293 return (this->
begin() <= ptr) && (
ptr < this->
end());
345 if (value ==
data_[j]) {
390 if (
data_[
i] == search_value) {
409 for (
const T &value : *
this) {
427 if (a.
size() !=
b.size()) {
430 return std::equal(a.
begin(), a.
end(),
b.begin());
464 template<std::
size_t N>
473 template<
typename U, BLI_ENABLE_IF((is_span_convertible_po
inter_v<U, T>))>
484 template<
typename U, BLI_ENABLE_IF((is_span_convertible_po
inter_v<T, U>))>
517 constexpr void fill(
const T &value)
const
528 static_assert(std::is_integral_v<IndexT>);
553 constexpr std::reverse_iterator<T *>
rbegin()
const
555 return std::reverse_iterator<T *>(this->
end());
557 constexpr std::reverse_iterator<T *>
rend()
const
559 return std::reverse_iterator<T *>(this->
begin());
594 const int64_t new_size = std::max<int64_t>(0, std::min(
size,
size_ - start));
610 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
621 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
731 return (this->
begin() <= ptr) && (
ptr < this->
end());
ATTR_WARN_UNUSED_RESULT const void * element
unsigned long long int uint64_t
blender::bke::pbvh::pixels::Rows::Pixel * data_
constexpr int64_t size() const
constexpr int64_t start() const
constexpr MutableSpan()=default
constexpr int64_t size() const
constexpr bool contains_ptr(const T *ptr) const
constexpr MutableSpan slice(IndexRange range) const
const T & const_reference
constexpr T & operator[](const int64_t index) const
constexpr bool contains(const T &value) const
constexpr std::reverse_iterator< T * > rbegin() const
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr bool is_empty() const
constexpr MutableSpan< NewT > cast() const
constexpr MutableSpan take_back(const int64_t n) const
constexpr T * data() const
constexpr MutableSpan drop_back(const int64_t n) const
constexpr void fill(const T &value) const
constexpr MutableSpan slice_safe(const int64_t start, const int64_t size) const
constexpr MutableSpan drop_front(const int64_t n) const
constexpr int64_t size_in_bytes() const
constexpr Span< T > as_span() const
constexpr T * end() const
constexpr MutableSpan(std::array< T, N > &array)
constexpr void reverse() const
constexpr T & first() const
constexpr int64_t count(const T &value) const
constexpr T * begin() const
constexpr MutableSpan(std::vector< T > &vector)
constexpr MutableSpan slice_safe(IndexRange range) const
constexpr std::reverse_iterator< T * > rend() const
constexpr IndexRange index_range() const
constexpr void copy_from(Span< T > values) const
constexpr MutableSpan(T *start, const int64_t size)
constexpr void fill_indices(Span< IndexT > indices, const T &value) const
constexpr MutableSpan(MutableSpan< U > span)
constexpr MutableSpan take_front(const int64_t n) const
constexpr T & last(const int64_t n=0) const
friend bool operator!=(const Span< T > a, const Span< T > b)
constexpr Span drop_front(int64_t n) const
Span< NewT > constexpr cast() const
constexpr Span slice_safe(const int64_t start, const int64_t size) const
constexpr Span slice(int64_t start, int64_t size) const
constexpr Span(Span< U > span)
constexpr int64_t size_in_bytes() const
constexpr std::reverse_iterator< const T * > rend() const
constexpr std::reverse_iterator< const T * > rbegin() const
constexpr const T * data() const
constexpr Span take_back(int64_t n) const
constexpr int64_t first_index_try(const T &search_value) const
friend bool operator==(const Span< T > a, const Span< T > b)
constexpr Span slice(IndexRange range) const
constexpr const T & operator[](int64_t index) const
constexpr Span(const std::vector< T > &vector)
constexpr Span(const T *start, int64_t size)
constexpr Span drop_back(int64_t n) const
constexpr int64_t count(const T &value) const
constexpr const T & first() const
constexpr bool has_duplicates__linear_search() const
constexpr int64_t first_index(const T &search_value) const
constexpr Span(const U *start, int64_t size)
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr const T * end() const
constexpr Span(const std::array< T, N > &array)
constexpr IndexRange index_range() const
constexpr const T * begin() const
constexpr Span(const std::initializer_list< T > &list)
constexpr uint64_t hash() const
constexpr Span slice_safe(IndexRange range) const
const T & const_reference
constexpr Span take_front(int64_t n) const
constexpr bool is_empty() const
constexpr bool contains(const T &value) const
constexpr bool contains_ptr(const T *ptr) const
constexpr bool intersects__linear_search(Span other) const
void initialized_fill_n(T *dst, int64_t n, const T &value)
uint64_t get_default_hash(const T &v, const Args &...args)
void initialized_copy_n(const T *src, int64_t n, T *dst)