template <class... Ts>

class Layout

Defined at line 669 of file ../../third_party/abseil-cpp/absl/container/internal/layout.h

Descriptor of arrays of various types and sizes laid out in memory one after

another. See the top of the file for documentation.

Check out the public API of internal_layout::LayoutImpl above. The type is

internal to the library but its methods are public, and they are inherited

by `Layout`.

Public Methods

template <class... Sizes>
PartialType<sizeof...(Sizes)> Partial (Sizes &&... sizes)

`Layout` knows the element types of the arrays we want to lay out in

memory but not the number of elements in each array.

`Partial(size1, ..., sizeN)` allows us to specify the latter. The

resulting immutable object can be used to obtain pointers to the

individual arrays.

It's allowed to pass fewer array sizes than the number of arrays. E.g.,

if all you need is to the offset of the second array, you only need to

pass one argument -- the number of elements in the first array.

// int[3] followed by 4 bytes of padding and an unknown number of

// doubles.

auto x = Layout

<int

, double>::Partial(3);

// doubles start at byte 16.

assert(x.Offset

<

1>() == 16);

If you know the number of elements in all arrays, you can still call

`Partial()` but it's more convenient to use the constructor of `Layout`.

Layout

<int

, double> x(3, 5);

Note: The sizes of the arrays must be specified in number of elements,

not in bytes.

Requires: `sizeof...(Sizes)

<

= sizeof...(Ts)`.

Requires: all arguments are convertible to `size_t`.

Defined at line 707 of file ../../third_party/abseil-cpp/absl/container/internal/layout.h

void Layout<Ts...> (internal_layout::TypeToSize<Ts>... sizes)

Creates a layout with the sizes of all arrays specified. If you know

only the sizes of the first N arrays (where N can be zero), you can use

`Partial()` defined above. The constructor is essentially equivalent to

calling `Partial()` and passing in all array sizes; the constructor is

provided as a convenient abbreviation.

Note: The sizes of the arrays must be specified in number of elements,

not in bytes.

Defined at line 720 of file ../../third_party/abseil-cpp/absl/container/internal/layout.h