Skip to content

structure_to_tuple accepts scalars #163

@anarthal

Description

@anarthal

I don't know if this is intended behavior, since I couldn't find anything in the docs. I was expecting that this:

auto t = pfr::structure_to_tuple(42);

Produced a compile-time error. As long as the argument is a scalar, it's accepted, producing a std::tuple<int>, in the above case. From the static_asserts in the code, this may be intended, but is pretty surprising behavior.

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