Read an unaligned value of type T and return it. Constexpr, but not optimized. Accepts inputs either of char-array types or char-backed enum-array types.
Declared in <folly/lang/Bits.h>
template<
class T,
class S>
constexpr
T
constexprPartialLoadUnaligned(
S const* s,
std::size_t l);
The l low bytes read from s, as a value of type T.
| Name | Description |
|---|---|
| s | Pointer to the single-byte elements to read. |
| l | The number of bytes to read; must be less than sizeof(T). |