Skip to content

struct passed between algorithms cannot contain an enum #765

Description

@wddgit

While implementing a version of the GausHitFinder algorithm, I tried to pass a type out of an unfold that contained an enum defined in LArSoft as a data member. This caused a static_assert in phlex to fail:

Line 232 in phlex/model/type_id.hpp

static_assert(std::is_fundamental_v<basic> || std::is_array_v<basic> ||
                      std::is_class_v<basic>,
                    "Taking type_id of an unsupported type");

I worked around this by making the data member an int and using a cast a couple places.

Is this an intentional restriction or something that needs to be improved in a future development?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions