Commit 0ca91ced authored by Lioncash's avatar Lioncash
Browse files

virtual_buffer: Add compile-time type-safety guarantees with VirtualBuffer

VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on
other platforms). Neither of these ensure that non-trivial objects are
properly constructed in the allocated memory.

To prevent potential undefined behavior occurring due to that, we can
add a static assert to loudly complain about cases where that is done.
parent b3c89978
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment