Skip to content

No default cases in C++ enum translation #1612

@elfenpiff

Description

@elfenpiff

This issue is intended to introduce new committers to the iceoryx2 development processes. Please do not use an AI agent, as this would defeat the purpose.

In iceoryx2-cxx/include/iox2/enum_translation.hpp several enum translation cases have a default: IOX2_UNREACHABLE() section in the switch case.

When we add new enums on the C++ side, the translation might be overlooked since the compiler will not warn us that there are uncovered cases. This can be solved by covering every case explicitly and translating it to IOX2_UNREACHABLE(). This is safe since those cases when a Rust mixed enum like Open/Create is translated to a C++ Open error enum.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions