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'm still not entirely clear on what the problem is here, since the -1 figure should never occur naturally and is able to be filtered out by the caller. Nevertheless, the way I see it, we have a few options:
Change the type of gentimes (currently standing at std::vector<int>) to be a vector of a sum type which is able to be matched against. This would force the aforementioned filtering (if you wanted to do anything useful with the number inside, at least), but would disrupt both API congruency and stability. There's also the boilerplate to consider.
Keep the return type the same, and just return a signal so far out of left field (probably INT_MIN/-2147483648) that any resulting figures are obviously erroneous. This would keep the API the same and reduce boilerplate, but wouldn't require filtering (whether this last point is a good or bad thing has yet to be decided, I think).
Ref: #21 (comment)
The text was updated successfully, but these errors were encountered: