Copies a range of POD elements to a non‐overlapping destination.

Synopsis

Declared in <folly/FBString.h>

template<class Pod>
void
podCopy(
    Pod const* b,
    Pod const* e,
    Pod* d);

Description

Lightly structured memcpy, simplifies copying PODs and introduces some asserts. Unfortunately using this function may cause measurable overhead (presumably because it adjusts from a begin/end convention to a pointer/size convention, so it does some extra arithmetic even though the caller might have done the inverse adaptation outside).

Parameters

Name

Description

b

Pointer to the first element to copy.

e

Pointer past the last element to copy.

d

Pointer to the start of the destination range.

Created with MrDocs