queues
queues copied to clipboard
mpsc-queue.hpp has issue
When using std::aligned_storage, you must explicitly call constructor and destructors on the "reinterpreted_cast"'d object (with placement new, and explicit output->~T() call).
In all case, std::aligned_storage is not required in this file, since the compiler will ensure that the structure is correctly aligned anyway. By default, unless you pragma pack your structure (which is not the case here), the compiler will ensure the structure is aligned with respect to its largest field's alignment requirement, and that's exactly what you get with the std::aligned_storage code that's written.