Skip to content

FSM: Use std::aligned_storage<> to avoid UB. #102

@PerMalmberg

Description

@PerMalmberg

Change

uint8_t state[2][static_cast<size_t>(StateSize)]{};

to something like (perhaps template on largest state size?)

std::aligned_storage<sizeof(BaseState)*2, alignof(BaseState)> state;

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