MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / align_for

Function align_for

tests/relacy/spmchash.cpp:8–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6{
7 template<typename U>
8 static inline char* align_for(char* ptr)
9 {
10 const std::size_t alignment = std::alignment_of<U>::value;
11 return ptr + (alignment - (reinterpret_cast<std::uintptr_t>(ptr) % alignment)) % alignment;
12 }
13}
14
15template<typename TValue>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected