Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

mpsc-queue.hpp has issue #3

@X-Ryl669

Description

@X-Ryl669

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions