Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_span.hh
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | public: | ||||
| using value_type = T; | using value_type = T; | ||||
| using pointer = T *; | using pointer = T *; | ||||
| using const_pointer = const T *; | using const_pointer = const T *; | ||||
| using reference = T &; | using reference = T &; | ||||
| using const_reference = const T &; | using const_reference = const T &; | ||||
| using iterator = const T *; | using iterator = const T *; | ||||
| using size_type = int64_t; | using size_type = int64_t; | ||||
| private: | protected: | ||||
| const T *data_ = nullptr; | const T *data_ = nullptr; | ||||
| int64_t size_ = 0; | int64_t size_ = 0; | ||||
| public: | public: | ||||
| /** | /** | ||||
| * Create a reference to an empty array. | * Create a reference to an empty array. | ||||
| */ | */ | ||||
| constexpr Span() = default; | constexpr Span() = default; | ||||
| ▲ Show 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | public: | ||||
| using value_type = T; | using value_type = T; | ||||
| using pointer = T *; | using pointer = T *; | ||||
| using const_pointer = const T *; | using const_pointer = const T *; | ||||
| using reference = T &; | using reference = T &; | ||||
| using const_reference = const T &; | using const_reference = const T &; | ||||
| using iterator = T *; | using iterator = T *; | ||||
| using size_type = int64_t; | using size_type = int64_t; | ||||
| private: | protected: | ||||
| T *data_; | T *data_; | ||||
| int64_t size_; | int64_t size_; | ||||
| public: | public: | ||||
| constexpr MutableSpan() = default; | constexpr MutableSpan() = default; | ||||
| constexpr MutableSpan(T *start, const int64_t size) : data_(start), size_(size) | constexpr MutableSpan(T *start, const int64_t size) : data_(start), size_(size) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines | |||||