16#include <lagrange/utils/span.h>
38 using element_type = T;
39 using value_type = std::remove_cv_t<T>;
74 std::shared_ptr<const T>
owner()
const {
return m_data; }
79 size_t size()
const {
return m_size; }
84 std::shared_ptr<T> m_data;
100template <
typename T,
typename Y>
103 return {std::shared_ptr<T>(r, element_ptr), size};
Shared span with ownership tracking.
Definition: SharedSpan.h:36
std::shared_ptr< const T > owner() const
Definition: SharedSpan.h:74
size_t size() const
Definition: SharedSpan.h:79
SharedSpan()
Default constructor for empty buffer.
Definition: SharedSpan.h:45
span< const T > get() const
Definition: SharedSpan.h:69
SharedSpan(std::shared_ptr< T > data, size_t size)
Constructing a SharedSpan object from a shared buffer.
Definition: SharedSpan.h:56
span< T > ref()
Definition: SharedSpan.h:64
SharedSpan< T > make_shared_span(const std::shared_ptr< Y > &r, T *element_ptr, size_t size)
Created a SharedSpan object around an internal buffer of a parent object.
Definition: SharedSpan.h:101
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition: span.h:27
Main namespace for Lagrange.
Definition: AABBIGL.h:30