15 template<
typename Type>
32 constexpr
Span(
ice::
Span<Type> const& other) noexcept = default;
34 constexpr
Span(Type* from, Type* to) noexcept;
37 constexpr
Span(Type(&location)[Size]) noexcept;
39 constexpr auto operator=(
ice::
Span<Type>&& other) noexcept ->
ice::
Span<Type>& = default;
40 constexpr auto operator=(
ice::
Span<Type> const& other) noexcept ->
ice::
Span<Type>& = default;
43 template<typename Self>
44 constexpr auto
data(this Self& self) noexcept ->
ice::
container::ValuePtr<Self> {
return self._data; }
50 requires(not std::is_const_v<ValueType>);
62 template<typename Type,
size_t Size>
63 static constexpr auto
make_span(std::array<Type, Size>& std_array) noexcept ->
Span<Type>;
64 template<typename Type,
size_t Size>
65 static constexpr auto
make_span(std::array<Type, Size> const& std_array) noexcept ->
Span<Type const>;
67 template<typename Type>
73 template<
typename Type>
79 template<
typename Type>
85 template<
typename Type>
86 template<ice::u64 Size>
92 template<
typename Type>
96 .location = self.data(),
102 template<
typename Type>
104 requires(not std::is_const_v<ValueType>)
107 .location = self.data(),
113 template<
typename Type,
size_t Size>
116 return Span<Type>{ std_array.data(), std_array.size() };
119 template<
typename Type,
size_t Size>
132 requires (std::is_trivially_copyable_v<T> && !std::is_pointer_v<T>)
141 out_value.
_data =
reinterpret_cast<T const*
>(source.
location);
#define ICE_ASSERT_CORE(expression)
Definition assert_core.hxx:43
A concept that ensures only types that can be trivially copyable can be 'forced' to use trifial Logic...
Definition container_logic.hxx:25
Definition associative_container.hxx:8
auto read_span(ice::Data source, ice::ncount count, ice::Span< T const > &out_value) noexcept -> ice::Data
Definition span.hxx:133
SPDX-License-Identifier: MIT.
Definition array.hxx:12
Span(ice::Span< T > &&) noexcept -> Span< T >
ContainerLogic
The logic implemented by a collectiont type when working with data. (Copying, Moving,...
Definition container_logic.hxx:13
std::uint64_t u64
Definition types.hxx:27
constexpr ice::ualign align_of
Definition mem_info.hxx:15
constexpr auto count(T const (&)[Size]) noexcept -> ice::u32
Definition base.hxx:43
static constexpr auto make_span(std::array< Type, Size > &std_array) noexcept -> Span< Type >
Definition span.hxx:114
Definition mem_data.hxx:17
ice::ualign alignment
Definition mem_data.hxx:20
void const * location
Definition mem_data.hxx:18
ice::usize size
Definition mem_data.hxx:19
Definition mem_memory.hxx:13
A view into an array of objects laid out in contiguous memory.
Definition span.hxx:17
ice::container::ConstCorrectContainerValueType< ContainerT > const * ConstIterator
Definition span.hxx:22
ValueType * _data
Definition span.hxx:28
constexpr Span() noexcept
Definition span.hxx:68
constexpr auto memory_view(this Span const &self) noexcept -> ice::Memory requires(not std::is_const_v< ValueType >)
Definition span.hxx:103
std::reverse_iterator< ice::container::ConstCorrectContainerValueType< ContainerT > const * > ConstReverseIterator
Definition span.hxx:23
ice::container::ConstCorrectContainerValueType< ContainerT > ConstContainerValueType
Definition span.hxx:19
std::reverse_iterator< ice::container::ConstCorrectContainerValueType< ContainerT > * > ReverseIterator
Definition span.hxx:21
ice::container::ConstCorrectContainerValueType< ContainerT > * Iterator
Definition span.hxx:20
ice::container::ConstCorrectContainerValueType< ContainerT > ValueType
Definition span.hxx:18
constexpr auto data(this Self &self) noexcept -> ice::container::ValuePtr< Self >
Definition span.hxx:44
SizeType::base_type _count
Definition span.hxx:27
ice::concepts::ContiguousContainerTag ContainerTag
Definition span.hxx:25
constexpr auto size(this Span const &self) noexcept -> ice::ncount
Definition span.hxx:45
ice::ncount SizeType
Definition span.hxx:24
constexpr auto data_view(this Span const &self) noexcept -> ice::Data
Definition span.hxx:93
Definition container_concepts.hxx:56
Definition contiguous_container.hxx:14
ice::detail::nvalue_base_utype base_type
Definition nvalue.hxx:75
static constexpr auto subtract(ice::usize left, ice::usize right) noexcept -> ice::usize
Perform a checked subtraction, ensuring 'left' is greater or equal to 'right'.
Definition mem_size_types.hxx:94