support references as bounded types?
- Dominant language
- C++
- Stars
- 71
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
variant2 cannot have references as bounded types, https://godbolt.org/z/mnP-CU, which is conforming with std::variant, but this could be another improvement over std::variant if it is not too much work to implement. boost::variant is supporting them and I am using this in boost.histogram in this function
https://github.com/HDembinski/histogram/blob/5ae08d40c26f8db0613545b84a4c0b60c3729102/include/boost/histogram/detail/axes.hpp#L47
which allows me to get a reference to an element of a std::tuple with a run-time index.
Related SO question:
https://stackoverflow.com/questions/54218595/why-are-references-forbidden-in-stdvariant
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.