You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no good reason for these to not compile when T occurs more than once in the list of alternatives, as it's possible to make them work as expected. In the unlikely case the static_assert is desired, the user can easily write it himself.
The text was updated successfully, but these errors were encountered:
The counterargument here is that in cases like variant<time_t, ptrdiff_t>, sometimes these can end up being the same type after porting the program to a different environment, and get<time_t> will silently succeed when code has (tried to) put a ptrdiff_t into the variant. At present, get<time_t> would fail to compile after the port, which would catch the problem.
There's no good reason for these to not compile when T occurs more than once in the list of alternatives, as it's possible to make them work as expected. In the unlikely case the static_assert is desired, the user can easily write it himself.
The text was updated successfully, but these errors were encountered: