-
Notifications
You must be signed in to change notification settings - Fork 36
Open
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
Metadata
Metadata
Assignees
Labels
No labels