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

Function align_for

readerwriterqueue.h:669–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667
668 template<typename U>
669 static AE_FORCEINLINE char* align_for(char* ptr) AE_NO_TSAN
670 {
671 const std::size_t alignment = std::alignment_of<U>::value;
672 return ptr + (alignment - (reinterpret_cast<std::uintptr_t>(ptr) % alignment)) % alignment;
673 }
674private:
675#ifndef NDEBUG
676 struct ReentrantGuard

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected