boostorg / boostorg/pfr

structure_to_tuple accepts scalars

Open
#163 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.5k
Forks
176
Avg merge
5d 21h
Merged PRs (30d)
1

Description

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`, in the above case. From the `static_assert`s in the code, this may be intended, but is pretty surprising behavior.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.