ΒΆtemplate <typename T>
bool store_and_advance(char*& buffer_ptr,
char* buffer_end,
const T& value,
size_t offset = 0)
template <typename T>
bool store_and_advance(char*& buffer_ptr,
char* buffer_end,
const T& value,
size_t offset = 0)
Description
Helper to store data from a value into a buffer and advance the pointer into that buffer. This routine first checks whether there is enough space in the provided buffer, and if not immediately returns false. If there is space, it copies the underlying bytes of value into the buffer, advances the buffer_ptr past the copied bytes, and returns true.
Declared at: llvm/include/llvm/ADT/Hashing.h:385
Templates
- T
Parameters
- char*& buffer_ptr
- char* buffer_end
- const T& value
- size_t offset = 0