3 ms·
All of those questions can be answered through comments. I'd vote for a separate function. Some of the answers can be encoded in the type system through the us
by blub 7y ago
All of those questions can be answered through comments. I'd vote for a separate function.
Some of the answers can be encoded in the type system through the use of time units (like std::chrono), optional return values and design by contract (preconditions). Unit tests could be added to further clarify some edge cases.