Shortcuts

Template Struct LayoutTraits< T, true >

Struct Documentation

template<typename T>
struct ripple::LayoutTraits<T, true>

Specialization of the layout traits for caset that the template type T implements the PolymorphicLayout interface, and when the layout kind for the type is a view type, which means that it does not own the data, and the data is therefore allocated somewhere else the the storage points to it.

Note

This should be used as layout_traits_t<T>, since that aliases the correct specializtion.

Template Parameters
  • T: The type to get the layout traits for.

Public Types

using IterStorage = std::conditional_t<is_strided_view, StridedView, ContigView>

Defines the type to use when storing in an iterator.

using Allocator = typename IterStorage::Allocator

Defines the type of the allocator for type T.

using Value = std::decay_t<T>

Defines the value type for the layout.

using IterCopy = typename AsContigOwned::Type

Defines the type T with owned storage for copying.

using IterRef = Value

Defines the type when referencing from an iterator.

using IterConstRef = const Value

Defines the type of a const reference for an iterator.

using IterPtr = PointerWrapper<Value>

Defines the type of a pointer for an iterator.

using IterConstPtr = const IterPtr

Defines thet type of a const pointer for an iterator.

using RawPtr = void*

Defines the type of the raw pointer to the data.

using ConstRawPtr = const void*

Defines the type of the const raw pointer to the data.

Public Static Attributes

constexpr LayoutKind layout_kind = detail::StorageLayoutKind<T>::value

Defines the type of the layout for T.

constexpr bool is_strided_view = is_strided_view_v<layout_kind>

True if the Layout is a strided view kind.

constexpr bool is_contiguous_view = is_contig_view_v<layout_kind>

True if the Layout is a contiguous view kind.

constexpr bool is_polymorphic_layout = true

Defines if the type T is a PolymorphicLayout type.

constexpr size_t alignment = Allocator::alignment

Defines the alignment required for allocation of the type.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples