|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
24 #include <type_traits>
31 #if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
37 # define OTB_MB_CSTXPR constexpr
39 # define OTB_MB_CSTXPR
60 template <
typename T>
struct Span
81 constexpr
Span() noexcept = default;
85 assert(! (!ptr) xor (!count));
114 template <
class Container> constexpr
Span(Container&& cont) noexcept
115 :
Span(cont.data(), cont.size())
122 :
Span(s.data(), s.size())
124 constexpr
Span(
const Span& other) noexcept =
default;
175 constexpr
bool empty() const noexcept {
return size() == 0; }
189 assert(offset <=
size());
190 if (count == std::numeric_limits<index_type>::max())
192 count =
size() - offset;
195 assert(count <= (
size() - offset));
222 template <
typename T>
245 template <
typename T>
266 template <
typename T, std::
size_t N>
286 template <
typename ContiguousContainer>
290 return Span<decltype(*c.data())>(c);
std::ptrdiff_t difference_type
~Span()=default
No-op destructor.
constexpr const_reference back() const noexcept
OTB_MB_CSTXPR reference operator[](index_type p) noexcept
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
constexpr Span last(index_type n) const noexcept
OTB_MB_CSTXPR reference back() noexcept
constexpr bool empty() const noexcept
constexpr const_reverse_iterator crbegin() const noexcept
std::remove_cv_t< T > value_type
constexpr const_reverse_iterator crend() const noexcept
auto make_span(T *first, T *last) noexcept
constexpr Span(const otb::Span< U > &s) noexcept
constexpr const_iterator begin() const noexcept
constexpr const_pointer data() const noexcept
std::reverse_iterator< const_iterator > const_reverse_iterator
OTB_MB_CSTXPR iterator begin() noexcept
constexpr const_iterator end() const noexcept
constexpr Span subspan(index_type offset, index_type count=std::numeric_limits< index_type >::max()) const noexcept
constexpr Span(element_type(&arr)[N]) noexcept
constexpr const_iterator cend() const noexcept
constexpr Span first(index_type n) const noexcept
constexpr Span() noexcept=default
OTB_MB_CSTXPR reverse_iterator rend() noexcept
std::vcl_size_t index_type
OTB_MB_CSTXPR reverse_iterator rbegin() noexcept
T const & const_reference
Span & operator=(Span const &) noexcept=default
shallow assignment
std::reverse_iterator< iterator > reverse_iterator
constexpr index_type size() const noexcept
OTB_MB_CSTXPR pointer data() noexcept
OTB_MB_CSTXPR reference front() noexcept
constexpr Span(pointer first, pointer last) noexcept
constexpr Span(Container &&cont) noexcept
OTB_MB_CSTXPR iterator end() noexcept
constexpr const_reference operator[](index_type p) const noexcept
constexpr const_iterator cbegin() const noexcept
constexpr const_reference front() const noexcept