Re:Enum class improvements for C++17, C++20 and C++23
by gpderetta on Monday August 05, 2024 @04:21AM
(#41159133)
> and obviously cannot work once you realize that std::variant is just syntax sugar over a tagged union
It would be easy to make it work, there isn't necessarily a strict relation between the template parameter and the actual stored object. Not having reference variant members was a conscious decision, same as optional<T&>. Hopefully this will be fixed in the future.
It would be easy to make it work, there isn't necessarily a strict relation between the template parameter and the actual stored object. Not having reference variant members was a conscious decision, same as optional<T&>. Hopefully this will be fixed in the future.