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
I'd love it if any_regular had a holds<T> routine (similar to std::variant). It would make checking for the type of the thing within the regular much more terse and easy to read.
Old:
if (my_regular.type_info() = typeid(dictionary_t)) {...
New:
if (my_regular.holds<dictionary_t>()) {...
Another option would be a routine that returns a pointer, so if the underlying type matches the caller doesn't have to go back in to get the value. This example is a free function but a member function would work as well:
Activity