Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structure_to_tuple accepts scalars #163

Open
anarthal opened this issue Mar 21, 2024 · 0 comments
Open

structure_to_tuple accepts scalars #163

anarthal opened this issue Mar 21, 2024 · 0 comments

Comments

@anarthal
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant