template <class Pair, class = std::true_type>

struct OffsetOf

Defined at line 273 of file ../../third_party/abseil-cpp/absl/container/internal/container_memory.h

If Pair is a standard-layout type, OffsetOf

<Pair

>::kFirst and

OffsetOf

<Pair

>::kSecond are equivalent to offsetof(Pair, first) and

offsetof(Pair, second) respectively. Otherwise they are -1.

The purpose of OffsetOf is to avoid calling offsetof() on non-standard-layout

type, which is non-portable.

Public Members

static const size_t kFirst
static const size_t kSecond