template <typename T>

class FieldWithArena

Defined at line 32 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

A container that holds a `T` and an arena pointer, where `T` has an

`InternalMetadataResolver` member. This is used for both directly

arena-allocated `T`'s and split `T`'s. Both cases need to return the correct

thing when a user calls `GetArena()` on `T`, or when internal code needs the

arena to do memory allocation.

This class is used to store `InternalMetadata` alongside `T` with an

`InternalMetadataResolver`, since `InternalMetadataResolver`s can only point

to an existing arena pointer "nearby" in memory.

Note that `FieldWithArena

<T

>` is destructor-skippable if and only if `T` is

destructor-skippable.

Public Methods

void FieldWithArena<T> ()

Defined at line 36 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

template <typename... Args>
void FieldWithArena<T> (Arena * arena, Args &&... args)

Defined at line 39 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

void ~FieldWithArena<T> ()

Defined at line 47 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

const T & field ()

Defined at line 56 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

T & field ()

Defined at line 57 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

Arena * GetArena ()

Returns the arena that the field is allocated on. This is cheaper than

calling `field().GetArena()`.

Defined at line 61 of file ../../third_party/protobuf/src/src/google/protobuf/field_with_arena.h

Friends

template <typename T>
class InternalMetadataOffset