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've noticed that I've been used this pattern for a while now. It would make a good quality of life improvement if I could check the type and then default to another value if the type check fails.
A common use case is when I need to call some function and then do verification:
Also, as an inspiration, we can look at SQL COALESCE function - https://docs.faircom.com/doc/sqlref/33405.htm. In this case, we can extend our typedef to the following: coalsceType<Target>(maybeTarget1, maybeTarget2, maybeTarget3);
I've noticed that I've been used this pattern for a while now. It would make a good quality of life improvement if I could check the type and then default to another value if the type check fails.
A common use case is when I need to call some function and then do verification:
This should be easy to simplify to:
The function name (ifType) is up to you
The text was updated successfully, but these errors were encountered: