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

Function align_for

tests/corealgos.h:156–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155 template<typename U>
156 static inline char* align_for(char* ptr)
157 {
158 const std::size_t alignment = std::alignment_of<U>::value;
159 return ptr + (alignment - (reinterpret_cast<std::uintptr_t>(ptr) % alignment)) % alignment;
160 }
161}
162
163

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected