Scroll to navigation

std::layout_right(3) C++ Standard Libary std::layout_right(3)

NAME

std::layout_right - std::layout_right

Synopsis

Defined in header <mdspan> struct layout_right; (since C++23)

layout_right is a LayoutMappingPolicy which provides a layout mapping where the rightmost extent has stride 1, and strides increase right-to-left as the product of extents.

layout_right is a TrivialType. (until C++26) layout_right is TriviallyCopyable, and (since C++26) std::is_trivially_default_constructible_v<layout_right> is true.

It is the default layout mapping policy used by std::mdspan if no user-specified layout is provided.


Nested class templates

mapping a layout mapping of layout_right
(public member class template)

See also

layout_right_padded row-major layout mapping policy with padding stride that can be (C++26) greater than or equal to the rightmost extent
(class template) layout_left column-major multidimensional array layout mapping policy; leftmost (C++23) extent has stride 1
(class) layout_stride a layout mapping policy with user-defined strides (C++23) (class)

2026.11.10 http://cppreference.com